Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
0c529c2
gccrs: Explicitly use an empty vector for structural eq
P-E-P Aug 5, 2025
5b436c3
gccrs: Refactor HIR::PatternItem class and its derivatives
Polygonalr Aug 2, 2025
e22ff80
gccrs: Improve handling of AttrInputLiteral
powerboat9 Aug 5, 2025
b2fbfd6
gccrs: Add missing header inclusion
P-E-P Aug 5, 2025
0f6aab8
gccrs: Copy cfg_attrs instead setting it to itself
P-E-P Aug 5, 2025
a69e8bb
gccrs: Avoid transitive declaration
P-E-P Aug 5, 2025
185f340
gccrs: Move vector of unique_ptr
P-E-P Aug 5, 2025
9c96e9d
gccrs: Fix variadic member flag value in constructor
P-E-P Aug 5, 2025
e539fdb
gccrs: Prevent copy from vector implementation
P-E-P Aug 5, 2025
8e8ac45
gccrs: Remove cyclic inclusion and unused headers.
P-E-P Aug 5, 2025
ce0bc8b
gccrs: Fix friendly class to friendly struct qualification
P-E-P Aug 6, 2025
1f94209
gccrs: Add header guards
P-E-P Aug 6, 2025
f3b6cf4
gccrs: Add missing direct include
P-E-P Aug 6, 2025
b15e81d
gccrs: Improve vector usages and avoid copies.
P-E-P Aug 6, 2025
77a4c01
gccrs: Handle attributes in expression macros
powerboat9 Jul 12, 2025
18e2944
gccrs: Exclude some inline assembly test
P-E-P Aug 8, 2025
176465d
gccrs: Fix ICE on exclusive_range_pattern lowering
Lishin1215 Aug 8, 2025
e7f460f
gccrs: Add checks to ExpandVisitor
powerboat9 Aug 9, 2025
5a34c84
gccrs: Refactor inline assembly constructor
P-E-P Aug 11, 2025
75bfc09
gccrs: Fix infinite loop on inline assembly clobbers
P-E-P Aug 11, 2025
ebca563
gccrs: Emit an error message on unsupported llvm_asm
P-E-P Aug 11, 2025
708bfbf
gccrs: Remove abort on wildcard patterns
P-E-P Aug 11, 2025
86c8fdb
gccrs: Add test for multiple wildcard use declaration.
P-E-P Aug 12, 2025
ded1ade
gccrs: CfgStrip AST nodes marked with #[test]
powerboat9 Aug 12, 2025
3678091
gccrs: fix error number
sakupan102 Mar 11, 2025
7015a2d
gccrs: Add name resolution processing for discriminant values
sakupan102 Aug 8, 2025
1c58e0e
gccrs: Detect failure to match an ident metavariable
powerboat9 Aug 10, 2025
7846b8b
gccrs: ast: Cleanup SingleASTNode::NodeType
CohenArthur Aug 12, 2025
994b629
gccrs: expand: Add handling for macro expansion in pattern context
CohenArthur Aug 13, 2025
5249f1c
gccrs: Fix Self macro invocation parsing failure
P-E-P Aug 12, 2025
d1de3d6
gccrs: nr2.0: Fix ChangeLog entry
powerboat9 Jul 31, 2025
b7498f0
gccrs: Improve handling of non-final path segments
powerboat9 Aug 11, 2025
f359a7f
gccrs: Reject empty cfg_attr
P-E-P Aug 13, 2025
4822bee
gccrs: fix ICE for empty enum variant
Lishin1215 Aug 14, 2025
c0b4ab0
gccrs: fix ICE by skipping invalid (non-FNDEF) candidates
Lishin1215 Aug 13, 2025
47a3e05
gccrs: Implement let statement support for IdentifierPattern's subpat…
Polygonalr Aug 12, 2025
1d1ac7e
gccrs: Add IdentifierPattern subpattern support for ClosureParamInfer
Polygonalr Aug 12, 2025
0d01542
gccrs: Read-only check if the variable is mutable type.
sakupan102 Aug 12, 2025
92514f7
gccrs: Replace old read-only checker with new implementation.
sakupan102 Aug 12, 2025
ff97ea8
gccrs: Collect lang items after expansion
powerboat9 Jul 10, 2025
fee30ad
gccrs: Implement rest pattern support for slice patterns
Polygonalr Aug 11, 2025
0e0064d
gccrs: fix ICE in convert_tree for tuple destructuring with ref
Lishin1215 Aug 10, 2025
7446983
gccrs: Improve libformat_parser FFI
powerboat9 Aug 13, 2025
e07a92c
gccrs: Expect identifier subpatterns to be non-alt
powerboat9 Aug 18, 2025
73461a3
gccrs: Remove #[simd_test] support
powerboat9 Jul 12, 2025
726964e
gccrs: Add null check to reconstruct
P-E-P Aug 18, 2025
19d77f2
gccrs: Fix generic type constraints
P-E-P Aug 19, 2025
8f1c727
gccrs: Treat function pointers like pointers for cast
P-E-P Aug 19, 2025
01200e9
gccrs: Convert lookup return type to optional
P-E-P Aug 19, 2025
af41cd4
gccrs: Remove unused copy
P-E-P Aug 21, 2025
04aab5c
gccrs: Avoid copy when constructing TypeBoundPredicate
P-E-P Aug 21, 2025
424dcc4
gccrs: Remove unused variable assignments
P-E-P Aug 21, 2025
e19eff2
gccrs: Refactor return statements
P-E-P Aug 21, 2025
f61476c
gccrs: Change coerce_unsize error handling
P-E-P Aug 21, 2025
f5419a0
gccrs: Put nevertype cercion into it's own function
P-E-P Aug 21, 2025
fd25405
gccrs: Use as member function instead of static cast
P-E-P Aug 22, 2025
4661cef
gccrs: Add fn pointer implementation test
P-E-P Aug 22, 2025
8a1b807
gccrs: Remove Parser::parse_path_in_expression_pratt
powerboat9 Aug 21, 2025
c374766
gccrs: Eagerly expand format_args macro
powerboat9 Aug 22, 2025
fb27422
gccrs: Avoid std::unique_ptr<std::string> in Token
powerboat9 Aug 24, 2025
57584ac
gccrs: Refactor AST Patterns that hold multiple pattern items
Polygonalr Aug 24, 2025
68c29c4
gccrs: nr1.0: Remove support in privacy checker
powerboat9 Aug 23, 2025
a795bc8
gccrs: nr1.0: Remove support in rust-session-manager.cc
powerboat9 Aug 23, 2025
4a983c0
gccrs: nr1.0: Remove support in pattern checker
powerboat9 Aug 23, 2025
ae0a6bf
gccrs: nr1.0: Remove support in borrow checker
powerboat9 Aug 23, 2025
f8512c2
gccrs: Separate strip information from internal state
P-E-P Aug 25, 2025
31f0b75
gccrs: ast: Add PointerVisitor
CohenArthur Aug 13, 2025
bfa5f4b
gccrs: desugar: Use PointerVisitor for ExpressionYeast
CohenArthur Aug 14, 2025
5935d5a
gccrs: Do not dump the AST if the parser emit errors
P-E-P Aug 26, 2025
9382d53
gccrs: Remove Parser::parse_tuple_index_expr_float
powerboat9 Aug 23, 2025
d1c0c07
gccrs: Allow early resolution to use the language prelude
powerboat9 Aug 10, 2025
0f2b656
gccrs: Emit error on lonely self use declaration
P-E-P Aug 26, 2025
74fcc1c
gccrs: Error out on unsuffixed self list use declaration
P-E-P Aug 26, 2025
3bcb2b3
gccrs: Make the coerce borrowed pointer consistent with try flag
philberty Aug 25, 2025
40e2d1f
gccrs: Remove some const usage so we can get rid of more can_eq usage
philberty Aug 25, 2025
9776b4f
gccrs: respect the unify rules commit flag
philberty Aug 25, 2025
e18d18c
gccrs: Update can_eq to be a types_compatable interface
philberty Aug 25, 2025
c66958c
gccrs: Add check bounds flag to unify rules for compatability checks
philberty Aug 29, 2025
51ee926
gccrs: remove 2nd last usage of can_eq
philberty Aug 29, 2025
80aeaa7
gccrs: simplify cloning of types during unify
philberty Aug 29, 2025
029ffce
gccrs: reuse an error mark node instead of new ones each failure
philberty Aug 29, 2025
47d38a4
gccrs: get rid of last can_eq usage finally
philberty Aug 29, 2025
c8f990e
gccrs: Remove fully the can_eq TyTy::BaseType::can_eq interface
philberty Aug 29, 2025
f7bf39f
gccrs: Fix formatting of tyty code
philberty Aug 29, 2025
239b7b7
gccrs: track generic const generics properly
philberty Aug 3, 2025
9762ea3
gccrs: Fix bug with unconstrained const generic
philberty Aug 3, 2025
e2b2f43
gccrs: allow unifications against non const types
philberty Aug 3, 2025
ea038eb
gccrs: Add implicit infer support for unify on const types
philberty Aug 19, 2025
c508ee3
gccrs: Recognize rustc_allow_const_fn_unstable
powerboat9 Jul 3, 2025
a4fd650
gccrs: Implement missing var decl case for TuplePatternItemsHasRest
Polygonalr Aug 27, 2025
e31e43b
gccrs: Implement missing read-only checker case for TuplePatternItems…
Polygonalr Aug 28, 2025
bc8e1f4
gccrs: Fix segv when handling invalid array capacities
philberty Aug 31, 2025
ff037ac
gccrs: Fix crash on break outside of loop context
philberty Aug 31, 2025
700e068
gccrs: Unify path-to-type handling in Late resolver
powerboat9 Jul 1, 2025
9c8c37a
gccrs: nr1.0: Remove chunks of resolution phase
powerboat9 Aug 28, 2025
f55ab3d
gccrs: Add test to confirm Rust-GCC/gccrs#3924 fix
P-E-P Sep 2, 2025
82521d1
gccrs: Add test to confirm Rust-GCC/gccrs#3922 fix
P-E-P Sep 2, 2025
d83c994
gccrs: get rid of more clones in unify path
philberty Sep 3, 2025
96300cc
gccrs: track abi and unsafety on fnptrs for proper type checking
philberty Sep 3, 2025
034b260
gccrs: Add libcore to the list of ignored prefixes
powerboat9 Aug 11, 2025
5c35b26
gccrs: Import libcore 1.49.0
powerboat9 Aug 11, 2025
a2f38ca
gccrs: nr1.0: Remove EarlyNameResolver
powerboat9 Sep 1, 2025
ce7c57a
gccrs: Create subdirectory checks/errors/feature
powerboat9 Aug 27, 2025
fa28613
gccrs: Remove AST::TraitItemConst
powerboat9 Sep 15, 2025
8ead0a6
gccrs: Protect from errors in alternate pattern parsing
powerboat9 Sep 14, 2025
d5b06ad
gccrs: Fix ICE with invalid const expression
philberty Sep 12, 2025
a6ac69e
gccrs: Fix ICE handling division by zero in const eval
philberty Sep 15, 2025
1fb7d98
gccrs: Import stdarch 1.49.0
powerboat9 Sep 17, 2025
fed8842
gccrs: Fix ICE for invalid const capacity expression handling
philberty Sep 17, 2025
f6f1424
gccrs: Implement TokenCollector::visit(AST::FormatArgs&)
Magnus-Mage Sep 7, 2025
e519936
gccrs: Improve FFIOpt
powerboat9 Sep 16, 2025
12a8c92
gccrs: fnptr types can hold onto generic params so it needs to handle…
philberty Sep 3, 2025
5283395
gccrs: Remove old hack from resolve operator overload
philberty Sep 3, 2025
8c1be15
gccrs: Fix ICE on copied array expressions
philberty Sep 21, 2025
a687da9
gccrs: Add error diag for self params on plain functions
philberty Sep 22, 2025
ebb61cc
gccrs: Fix ICE where we expect a num enum variant
philberty Sep 22, 2025
3b06cad
gccrs: Prevent segfault on builtin metavars
P-E-P Sep 18, 2025
d058e66
gccrs: Emit errors from the transcriber when they occur
P-E-P Sep 18, 2025
bc09858
gccrs: Add origin location to expanded tokens
P-E-P Sep 18, 2025
e9a05df
gccrs: expand: Inherit from PointerVisitor
CohenArthur Aug 22, 2025
6bce77c
gccrs: Handle link_name attribute
powerboat9 Sep 14, 2025
d238dc6
gccrs: Add HIR lowering support for rest pattern in struct patterns' AST
Polygonalr Sep 22, 2025
5484bda
gccrs: Fix StructPattern type checking rejecting tuple struct scrutinee
Polygonalr Sep 28, 2025
54c2e63
gccrs: Test libcore
powerboat9 Sep 17, 2025
38de50c
gccrs: tests: added extra parens compile test
0xllx0 Sep 30, 2025
18a9f85
gccrs: Implement lowering of AST::TupleStructItemsHasRest
Polygonalr Aug 25, 2025
28e2587
gccrs: Implement compilation support for HIR::TupleStructItemsHasRest
Polygonalr Aug 25, 2025
5fc4f15
gccrs: Use rich_location for TupleStructPattern type check num field …
Polygonalr Sep 2, 2025
51cfb72
gccrs: Emit an error on malformed path
P-E-P Oct 1, 2025
5fbc70a
gccrs: Add override modifier
P-E-P Oct 1, 2025
6f4b959
gccrs: Force crash when retrieving meta item location
P-E-P Oct 1, 2025
4bcb1d6
gccrs: Avoid malformed attribute conversion
P-E-P Oct 1, 2025
60c0c44
gccrs: Add doc attribute checking on traits
P-E-P Oct 1, 2025
1983aa8
gccrs: fix: add early return for empty module file
0xllx0 Oct 3, 2025
39fe97f
gccrs: test: add a regression test for issue Rust-GCC/gccrs#4145
0xllx0 Sep 30, 2025
5909d43
gccrs: Refactor TyTy::ConstType into separate types
philberty Oct 4, 2025
01a3275
gccrs: Emit error when tuple-indexing on non-tuples
lowr Oct 12, 2025
0b4352a
gccrs: fix ICE in TyVar constructor
Lishin1215 Sep 27, 2025
279d97b
gccrs: fix inner attr derive doesn't show error
Oct 15, 2025
681263c
gccrs: Fix ICE for repr attribute malformation
Polygonalr Oct 18, 2025
32a636b
gccrs: Fix ICE on enum in tuple struct pattern
lowr Oct 19, 2025
d711714
gccrs: Attempt to resolve pattern items in tuple pattern with a rest …
Polygonalr Oct 18, 2025
a1c4558
Improve ErrorPropagationExpr handling
powerboat9 Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions contrib/gcc-changelog/git_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
'gcc/testsuite/go.test/test/',
'libffi/',
'libgo/',
'libgrust/rustc-lib/core/',
'libphobos/libdruntime/',
'libphobos/src/',
'libsanitizer/',
Expand Down
2 changes: 1 addition & 1 deletion gcc/rust/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5197,7 +5197,7 @@

2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>

* resolve/rust-name-resolver.cc: Include options.txt.
* resolve/rust-name-resolver.cc: Include options.h.
(Resolver::insert_resolved_name): Assert that name resolution
2.0 is disabled.
(Resolver::lookup_resolved_name): Likewise.
Expand Down
19 changes: 8 additions & 11 deletions gcc/rust/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GRS_OBJS = \
rust/rust-ast-dump.o \
rust/rust-ast-collector.o \
rust/rust-ast-visitor.o \
rust/rust-ast-pointer-visitor.o \
rust/rust-hir-visitor.o \
rust/rust-hir-dump.o \
rust/rust-session-manager.o \
Expand Down Expand Up @@ -147,17 +148,8 @@ GRS_OBJS = \
rust/rust-ice-finalizer.o \
rust/rust-late-name-resolver-2.0.o \
rust/rust-immutable-name-resolution-context.o \
rust/rust-early-name-resolver.o \
rust/rust-name-resolver.o \
rust/rust-ast-resolve.o \
rust/rust-ast-resolve-base.o \
rust/rust-ast-resolve-item.o \
rust/rust-ast-resolve-pattern.o \
rust/rust-ast-resolve-expr.o \
rust/rust-ast-resolve-type.o \
rust/rust-ast-resolve-path.o \
rust/rust-ast-resolve-stmt.o \
rust/rust-ast-resolve-struct-expr-field.o \
rust/rust-resolve-builtins.o \
rust/rust-forever-stack.o \
rust/rust-hir-type-check.o \
rust/rust-privacy-check.o \
Expand Down Expand Up @@ -209,7 +201,6 @@ GRS_OBJS = \
rust/rust-lint-marklive.o \
rust/rust-lint-unused-var.o \
rust/rust-readonly-check.o \
rust/rust-readonly-check2.o \
rust/rust-hir-type-check-path.o \
rust/rust-unsafe-checker.o \
rust/rust-hir-pattern-analysis.o \
Expand Down Expand Up @@ -443,6 +434,7 @@ RUST_INCLUDES = -I $(srcdir)/rust \
-I $(srcdir)/rust/checks/errors \
-I $(srcdir)/rust/checks/errors/privacy \
-I $(srcdir)/rust/checks/errors/borrowck \
-I $(srcdir)/rust/checks/errors/feature \
-I $(srcdir)/rust/util \
-I $(srcdir)/rust/metadata \
-I $(srcdir)/../libgrust
Expand Down Expand Up @@ -515,6 +507,11 @@ rust/%.o: rust/checks/errors/%.cc
$(COMPILE) $(RUST_CXXFLAGS) $(RUST_INCLUDES) $<
$(POSTCOMPILE)

# build feature related files in rust folder
rust/%.o: rust/checks/errors/feature/%.cc
$(COMPILE) $(RUST_CXXFLAGS) $(RUST_INCLUDES) $<
$(POSTCOMPILE)

# build privacy pass files in rust folder
rust/%.o: rust/checks/errors/privacy/%.cc
$(COMPILE) $(RUST_CXXFLAGS) $(RUST_INCLUDES) $<
Expand Down
56 changes: 23 additions & 33 deletions gcc/rust/ast/rust-ast-builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,12 @@ std::unique_ptr<GenericParam>
Builder::new_lifetime_param (LifetimeParam &param)
{
Lifetime l = new_lifetime (param.get_lifetime ());

std::vector<Lifetime> lifetime_bounds;
lifetime_bounds.reserve (param.get_lifetime_bounds ().size ());

for (auto b : param.get_lifetime_bounds ())
{
Lifetime bl = new_lifetime (b);
lifetime_bounds.push_back (bl);
}
lifetime_bounds.emplace_back (new_lifetime (b));

auto p = new LifetimeParam (l, std::move (lifetime_bounds),
param.get_outer_attrs (), param.get_locus ());
Expand Down Expand Up @@ -605,11 +605,11 @@ Builder::new_type_param (
for (const auto &lifetime : tb.get_for_lifetimes ())
{
std::vector<Lifetime> lifetime_bounds;
lifetime_bounds.reserve (
lifetime.get_lifetime_bounds ().size ());

for (const auto &b : lifetime.get_lifetime_bounds ())
{
Lifetime bl = new_lifetime (b);
lifetime_bounds.push_back (std::move (bl));
}
lifetime_bounds.emplace_back (new_lifetime (b));

Lifetime nl = new_lifetime (lifetime.get_lifetime ());
LifetimeParam p (std::move (nl), std::move (lifetime_bounds),
Expand All @@ -626,12 +626,11 @@ Builder::new_type_param (
{
const TypePathSegment &segment
= (const TypePathSegment &) (*seg.get ());
TypePathSegment *s = new TypePathSegment (

segments.emplace_back (new TypePathSegment (
segment.get_ident_segment (),
segment.get_separating_scope_resolution (),
segment.get_locus ());
std::unique_ptr<TypePathSegment> sg (s);
segments.push_back (std::move (sg));
segment.get_locus ()));
}
break;

Expand All @@ -642,11 +641,10 @@ Builder::new_type_param (

GenericArgs args
= new_generic_args (generic.get_generic_args ());
TypePathSegmentGeneric *s = new TypePathSegmentGeneric (

segments.emplace_back (new TypePathSegmentGeneric (
generic.get_ident_segment (), false, std::move (args),
generic.get_locus ());
std::unique_ptr<TypePathSegment> sg (s);
segments.push_back (std::move (sg));
generic.get_locus ()));
}
break;

Expand All @@ -664,23 +662,19 @@ Builder::new_type_param (
TypePath p (std::move (segments), path.get_locus (),
path.has_opening_scope_resolution_op ());

TraitBound *b = new TraitBound (std::move (p), tb.get_locus (),
tb.is_in_parens (),
tb.has_opening_question_mark (),
std::move (for_lifetimes));
std::unique_ptr<TypeParamBound> bound (b);
type_param_bounds.push_back (std::move (bound));
type_param_bounds.emplace_back (new TraitBound (
std::move (p), tb.get_locus (), tb.is_in_parens (),
tb.has_opening_question_mark (), std::move (for_lifetimes)));
}
break;

case TypeParamBound::TypeParamBoundType::LIFETIME:
{
const Lifetime &l = (const Lifetime &) *b.get ();

auto bl = new Lifetime (l.get_lifetime_type (),
l.get_lifetime_name (), l.get_locus ());
std::unique_ptr<TypeParamBound> bound (bl);
type_param_bounds.push_back (std::move (bound));
type_param_bounds.emplace_back (
new Lifetime (l.get_lifetime_type (), l.get_lifetime_name (),
l.get_locus ()));
}
break;
}
Expand Down Expand Up @@ -709,18 +703,14 @@ Builder::new_generic_args (GenericArgs &args)
location_t locus = args.get_locus ();

for (const auto &lifetime : args.get_lifetime_args ())
{
Lifetime l = new_lifetime (lifetime);
lifetime_args.push_back (std::move (l));
}
lifetime_args.push_back (new_lifetime (lifetime));

for (auto &binding : args.get_binding_args ())
{
Type &t = *binding.get_type_ptr ().get ();
std::unique_ptr<Type> ty = t.reconstruct ();
GenericArgsBinding b (binding.get_identifier (), std::move (ty),
binding.get_locus ());
binding_args.push_back (std::move (b));
binding_args.emplace_back (binding.get_identifier (), std::move (ty),
binding.get_locus ());
}

for (auto &arg : args.get_generic_args ())
Expand Down
Loading