https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116225
Sam James changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
Hi everyone,
This is our the third patchset in the series for updating upstream GCC
with the latest changes in our development repository.
Most notably this contains handling for if-let statements by Marc
Poulhiès, changes to our name-resolution pass rewrite, and massive
changes to our AST and HI
From: Marc Poulhiès
Replace the "regular" AST->HIR lowering for IfLet* with a desugaring
into a MatchExpr.
Desugar a simple if let:
if let Some(y) = some_value {
bar();
}
into:
match some_value {
Some(y) => {bar();},
_ => ()
}
Same applies for IfLetExprConseqElse (
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Insert trait names into the type namespace.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 3 +++
1 file changed, 3 insertions(+)
diff --g
From: Owen Avery
This makes PathIdentSegment more similar to other classes used to
represent path segments.
gcc/rust/ChangeLog:
* ast/rust-path.h
(PathIdentSegment::is_super_segment): Rename to...
(PathIdentSegment::is_super_path_seg): ...here.
(PathIdentSegment:
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/rust-unsafe-checker.cc: Add includes.
(UnsafeChecker::visit): Use 2.0 version of resolver when name
resolution 2.0 is enabled.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-b
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Handle SelfParam.
* resolve/rust-late-name-resolver-2.0.h
(Late::visit): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-o
From: Philip Herron
This changes our enum type layout so for example:
enum Foo {
A,
B,
C(char),
D { x: i32, y: i32 },
}
Used to get layed out like this in gccrs:
union {
struct A { int RUST$ENUM$DISR; };
struct B { int RUST$ENUM$DISR; };
struct C { int
From: Arthur Cohen
This commit adds a new kind of Path, changes the base Path class and turns
TypePath
into a child of the base Path class.
gcc/rust/ChangeLog:
* ast/rust-path.h (class LangItemPath): New.
(class TypePath): Adapt to accomodate LangItemPath.
* ast/rust-as
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-item.h: Add new method to specifically get a type-path.
* ast/rust-path.cc (LangItemPath::as_string): Implement properly.
* hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt
visitor to use the new Lan
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc: Add new methods for constructing struct
exprs.
* ast/rust-ast-builder.h: Mention how to build tuple expressions.
---
gcc/rust/ast/rust-ast-builder.cc | 12 ++--
gcc/rust/ast/rust-ast-builder.h | 5 +
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc: Clone enum identifier variants properly
* expand/rust-derive-clone.h: Declare new functions used.
---
gcc/rust/expand/rust-derive-clone.cc | 52 ++--
gcc/rust/expand/rust-derive-clone.h
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc (Builder::struct_struct): New function.
* ast/rust-ast-builder.h (vec): New function.
---
gcc/rust/ast/rust-ast-builder.cc | 15 +++
gcc/rust/ast/rust-ast-builder.h | 31 +++
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit): Make sure to scope visitation of the
children of type definition items.
* resolve/rust-default-resolver.h
(DefaultResolver::visit): Add overrides for TupleStr
From: Liam Naddell
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc:
Change the late name resolver to enter proper lexical scope during
typechecking
* resolve/rust-late-name-resolver-2.0.h:
Add needed prototype to header
* resolve/rust-toplevel
From: Philip Herron
Fixes Rust-GCC#3229
gcc/rust/ChangeLog:
* rust-gcc.cc (operator_to_tree_code): ! expressions are BIT_NOT_EXPR
Signed-off-by: Philip Herron
---
gcc/rust/rust-gcc.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/
From: Owen Avery
ForeverStackStore is meant to partially unify the internal states of
per-namespace ForeverStack instances. This commit does not contain
modifications to ForeverStack which would allow it to rely on a
ForeverStackStore to store nodes, but a future commit should address
this.
gcc/
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Add visitor for TraitItemType.
* resolve/rust-toplevel-name-resolver-2.0.h
(TopLevel::visit): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclu
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-collect-lang-items.cc (CollectLangItems::visit): Add visitor
for collecting
functions that might be lang items.
* ast/rust-collect-lang-items.h: Likewise.
---
gcc/rust/ast/rust-collect-lang-items.cc | 8
gcc/rus
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/privacy/rust-privacy-reporter.cc:
Include rust-immutable-name-resolution-context.h.
(is_child_module): Use ForeverStack::is_module_descendant if name
resolution 2.0 is enabled.
* resolve/rust-forever-sta
From: Pierre-Emmanuel Patry
The HIR made heavy use of pair and other unamed types which can be
difficult to read.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Use FnParam getter.
* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
* backend/rust-compile
From: Philip Herron
When resolving a type like this which is generic it causes the argument
substitution to go through bounds checking which is expected. But this
can call a type bounds probe which again calls a type query which will be
on the Impl Type on an impl block which can result in a recu
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Forward
an optional to the constructor.
* hir/tree/rust-hir-item.cc (TypeParam::TypeParam): Use an optional
in the constructor.
(TypeParam::operator
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-context.cc
(Context::setup_builtins): Use TypeCheckContext::get_builtins
instead of Resolver::get_builtin_types,
TypeCheckContext::lookup_type_by_node_id, and
TypeCheckContext::lookup_type.
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/privacy/rust-visibility-resolver.cc:
Add includes.
(VisibilityResolver::resolve_module_path): Use name resolver 2.0
(when enabled) to lookup path resolutions.
Signed-off-by: Owen Avery
---
.../privacy/rust-vi
From: Antoni Boucher
Move the code from i386-rust.cc to i386-rust-and-jit.inc so that it can
be reused by libgccjit.
gcc/ChangeLog:
* config/i386/i386-rust-and-jit.inc: New file.
* config/i386/i386-rust.cc: Move code to i386-rust-and-jit.inc.
---
gcc/config/i386/i386-rust-and-j
From: Philip Herron
We do not need to inject inference variables on generic patterns
with generic blocks. This will just cause unconstrained inference
variables as they may not unify against something.
Fixes Rust-GCC#2323
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc
(Ty
From: Philip Herron
Fixes RustGcc#2953
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): fix the
ty_id
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: nr2 cant handle these
* rust/compile/issue-2953-1.rs: New test.
* rust
From: Philip Herron
The original test case 1773 has been moved to a new issue 3242 which
is still open and test-case is skipped. The original issue in 1773 is
fixed so this will close out that issue
Fixes Rust-Gcc#1773
gcc/testsuite/ChangeLog:
* rust/compile/issue-1773.rs: new test cas
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h
(ForeverStack::push): Accept argument of type Rib::Kind rather
than Rib.
* resolve/rust-forever-stack.hxx
(ForeverStack::push): Likewise.
* resolve/rust-name-resolution-context.cc
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/privacy/rust-privacy-reporter.cc
(PrivacyReporter::check_for_privacy_violation): Use name
resolver 2.0.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-by: Owen Avery
---
...
From: Philip Herron
TypePaths have special handling for Self where we can look at the current ctx
for more acurate TypeAlias information if required. We cant do this for Impl
contexts but not for Traits as we might as well fall back to the TypePathProbe.
The other issue was the dyn type comming
From: Owen Avery
I probably missed a few spots, but this should cover most of the type
checker.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc: Add includes.
(TypeCheckExpr::visit): Use name resolver 2.0.
(TypeCheckExpr::resolve_operator_overload): Likewise.
From: Philip Herron
We cannot apply aligned or packed after layout_type is called you need
to set this up first then call it.
Fixes Rust-GCC#3260
gcc/rust/ChangeLog:
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): call lauout
type directly
* rust-backend.h (struct_
From: Arthur Cohen
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Fix comment location to align with other
comments.
---
gcc/rust/util/rust-lang-item.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
inde
From: Philip Herron
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::visit): add missing check for no return
value
Signed-off-by: Philip Herron
---
gcc/rust/hir/rust-hir-dump.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc
From: Philip Herron
These are ported from the c-family code c-warn.cc and c/c-typchk.cc
Fixes Rust-GCC#2394
gcc/rust/ChangeLog:
* backend/rust-constexpr.cc (eval_store_expression): check for null
(eval_call_expression): remove bad warning
* rust-gcc.cc (arithmetic_or_lo
From: Sri Ganesh Thota
gcc/rust/ChangeLog:
* ast/rust-item.h: I have changed helper constructor for typepath
to be a delegating constructor.
Signed-off-by: Sri Ganesh Thota
---
gcc/rust/ast/rust-item.h | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff -
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit):
Resolve additional
trait bounds.
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Error out
properly on unresolved
type-path instead of crashing
From: Arthur Cohen
This commit adds new methods for building pattern nodes, match expressions and
more precise call expressions.
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc: Add new functions.
* ast/rust-ast-builder.h: Declare them.
---
gcc/rust/ast/rust-ast-builder.cc | 91
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h: Replace context with StackedContexts.
* ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Use new APIs.
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Likewise.
---
gcc/rust/ast/rust-as
From: Arthur Cohen
gcc/rust/ChangeLog:
* util/rust-stacked-contexts.h: Add new method to see what context we
are currently in.
---
gcc/rust/util/rust-stacked-contexts.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/util/rust-stacked-contexts.h
b/gcc/rust/util/rus
From: Nobel
Added rules to allow type casting pointer as integer types (u*,i*)
and integer types to be casted as pointer.
gcc/rust/ChangeLog:
* typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
gcc/testsuite/ChangeLog:
* rust/compile/ptr_int_cast.rs: New test.
Si
From: Philip Herron
The code here was wrongly assuming the decl type from the folding of the
expression would be the type of the constant decl. This is not the case for
unsized coercions for slices, where the expression here is a reference to
an array then we require the coercion to fix the resul
From: Philip Herron
This ensures that we handle var decls readonly checks much better
Addresses: Rust-GCC#807 Rust-GCC#3287
gcc/rust/ChangeLog:
* checks/errors/rust-readonly-check.cc (check_decl): improve mut check
(emit_error): helper
(check_modify_expr): likewise
From: Philip Herron
Fixes Rust-GCC#266
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: nr2 cant handle this
* rust/compile/issue-266.rs: New test.
Signed-off-by: Philip Herron
---
gcc/testsuite/rust/compile/issue-266.rs | 3 +++
gcc/testsuite/rust/compile/nr2/exclude |
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Adapt resolver
to lang item paths.
* resolve/rust-ast-resolve-type.h: Likewise.
---
gcc/rust/resolve/rust-ast-resolve-item.cc | 30 +--
gcc/rust/resolve/ru
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h
(ForeverStack::find_starting_point): Use type
'std::reference_wrapper &' instead of 'Node &' for
parameter starting_point.
* resolve/rust-forever-stack.hxx
(ForeverStack::find_star
From: Arthur Cohen
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLowerTypePath::visit): Adapt code to
lang item
type path segments.
---
gcc/rust/hir/rust-ast-lower-type.cc | 40 ++---
1 file changed, 14 insertions(+), 26 deletions(-)
diff --git a
From: Philip Herron
We need to add name resolution and hir lowering for items as part of blocks
in order to typecheck and compile them correctly.
Fixes Rust-GCC#3350
gcc/rust/ChangeLog:
* hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): hir lowering
* hir/rust-ast-lower-stm
From: Philip Herron
We need to check if the borrowed value is valid before creating the
reference type. Otherwise this will lead to an ICE.
Fixes Rust-GCC#3140
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): check
for error
* typecheck/rust-
Hi!
On 2025-03-17T20:03:48+, Iain Sandoe via Gcc wrote:
>> On 17 Mar 2025, at 19:43, Toon Moene wrote:
>>
>> I was eager to try the new rust updates ...
>>
>> But I got this:
>>
>> error[E0554]: `#![feature]` may not be used on the stable release channel
>> --> src/lib.rs:19:1
>> |
>>
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-collect-lang-items.cc (get_lang_item_attr): Show unknown
attribute upon error.
---
gcc/rust/ast/rust-collect-lang-items.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-collect-lang-items.cc
b/
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple
pattern items as
separated by commas.
---
gcc/rust/ast/rust-ast-collector.cc | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-col
From: Arthur Cohen
Which formats a lang item as it appears in source code.
gcc/rust/ChangeLog:
* util/rust-lang-item.cc (LangItem::PrettyString): New.
* util/rust-lang-item.h: New.
---
gcc/rust/util/rust-lang-item.cc | 6 ++
gcc/rust/util/rust-lang-item.h | 1 +
2 files ch
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc (DeriveClone::visit_union): Manually
generate
the struct used for asserting a union implements Copy.
---
gcc/rust/expand/rust-derive-clone.cc | 38 +---
1 file changed, 34 insertions(+)
From: Philip Herron
Unify rules are not the same as coercion rules. The coercion of ! is
allowed to any type but not for a unify site which is different.
Match arms are another least upper bound coercion.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): implemen
From: Philip Herron
Return type and parameter types are optional on closures.
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::visit): add null guard
Signed-off-by: Philip Herron
---
gcc/rust/hir/rust-hir-dump.cc | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/compile/macros/builtin/eager1.rs: Switch to scan-assembler
directive as the
GIMPLE dump does not contain strings on LE.
* rust/compile/macros/builtin/recurse2.rs: Likewise.
---
.../rust/compile/macros/builtin/eager1.rs
From: liushuyu
gcc/testsuite/ChangeLog:
* rust/compile/try-catch-unwind-old.rs: add a test to test the older
try intrinsics from plain old Rust to v1.78.0
* rust/compile/try-catch-unwind-new.rs: add a test to test the newer
catch_unwind instrinsics since Rust v1.78
From: Pierre-Emmanuel Patry
System includes shall use rust-system header instead.
gcc/rust/ChangeLog:
* ast/rust-stmt.h: Remove stdlib include and use rust-system instead.
* backend/rust-compile-expr.cc: Likewise.
* backend/rust-mangle-legacy.cc: Likewise.
* back
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Improve
formatting.
---
.../resolve/rust-late-name-resolver-2.0.cc | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/gcc/rust/resolve/rust-late-name-
From: Arthur Cohen
Both TraitItemFunc::has_definition() and TraitItemFunc::has_block_defined()
were exactly the same implementation, so remove one.
gcc/rust/ChangeLog:
* hir/tree/rust-hir-item.h: Remove TraitItemFunc::has_block_defined()
* backend/rust-compile-implitem.cc (Compi
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/compile/derive_macro4.rs: Mark Copy and Clone as lang items.
---
gcc/testsuite/rust/compile/derive_macro4.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/testsuite/rust/compile/derive_macro4.rs
b/gcc/testsuite/rust/compil
From: Arthur Cohen
Lang item typepaths were not handled properly, and required a complete overhaul.
All old classes that concerned lang item paths are now modified to use a simpler
version of `AST::LangItemPath`, which has been removed. TypePath segments can
now
be lang items, as this is requied
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc
(Early::visit): Resolve the pending eager invocations inside
builtin macro invocations.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-by: Owen Avery
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/compile/derive_macro1.rs: Add #[lang = "clone"] to Clone trait.
* rust/compile/derive_macro3.rs: Likewise.
* rust/compile/derive_macro6.rs: Likewise.
* rust/execute/torture/derive_macro3.rs: Likewise.
---
gcc/tes
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/compile/derive_macro4.rs: Make PhantomData a lang item.
---
gcc/testsuite/rust/compile/derive_macro4.rs | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/testsuite/rust/compile/derive_macro4.rs
b/gcc/testsuite
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc (DeriveClone::clone_call): Mention using
`clone_fn`
lang item in the future.
---
gcc/rust/expand/rust-derive-clone.cc | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/gcc/rus
From: Arthur Cohen
gcc/rust/ChangeLog:
* hir/tree/rust-hir.h: Add override qualifier to overriden method.
---
gcc/rust/hir/tree/rust-hir.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index 8ce5cf4d102..8
From: Arthur Cohen
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Add new lang items.
* util/rust-lang-item.cc: Likewise.
---
gcc/rust/util/rust-lang-item.cc | 6 ++
gcc/rust/util/rust-lang-item.h | 9 +
2 files changed, 15 insertions(+)
diff --git a/gcc/rust/util/ru
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-copy.cc: Use lang item path.
---
gcc/rust/expand/rust-derive-copy.cc | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/gcc/rust/expand/rust-derive-copy.cc
b/gcc/rust/expand/rust-derive-copy.cc
index b
From: Pierre-Emmanuel Patry
A variant being moved lead to a null being created and a segfault later
down the line.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Call getter
instead of size function.
* checks/errors/privacy/rust-privacy-reporter
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc (DeriveClone::variant_match_path): New
function.
(DeriveClone::clone_enum_identifier): Rename.
(DeriveClone::clone_enum_tuple): New function.
(DeriveClone::visit_enum): Visit tuple variants prop
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc (DeriveClone::visit_union): Create a lang
item path
instead of a regular path.
---
gcc/rust/expand/rust-derive-clone.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/expand/rust-
From: Om Swaroop Nayak <96killera...@gmail.com>
* ast/rust-collect-lang-items.cc (get_lang_item_attr): "removed checker
fn"
* util/rust-attributes.cc (Attributes::is_lang_item): "added fn"
* util/rust-attributes.h: "added fn"
Signed-off-by: Om Swaroop Nayak <96killera...@
From: Arthur Cohen
gcc/rust/ChangeLog:
* util/rust-attribute-values.h: Declare new attribute value.
* util/rust-attributes.cc: Use it.
---
gcc/rust/util/rust-attribute-values.h | 1 +
gcc/rust/util/rust-attributes.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/gcc
From: Arthur Cohen
This commit correctly lowers and typechecks parenthesized types, which are used
for trait objects with additional bounds.
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc (ResolveType::visit): New visitor to
handle
ParenthesizedType.
* resolve/
From: Prajwal S N
Replaces the DIY vector stack with a StackedContexts object for block
scopes in the type checker context.
Fixes #3284.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check.h (class TypeCheckContext): add
header file and use StackedContexts for blocks
*
From: Arthur Cohen
This commit adds things like Item::Kind, Expr::Kind, etc, and implements the
associated `get_*_kind` functions.
It also removes the more generic AST::Kind enum we were using, which was
incomplete and painful to use.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add new Kind
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Use DefaultResolver::visit and avoid a call
to Identifier::as_string while handling instances of StaticItem.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-topleve
From: Arthur Cohen
Fixes a couple of warnings thrown by clang, with mismatched class/struct
usages and unused members.
gcc/rust/ChangeLog:
* ast/rust-expr.h: Remove invalid usage of `struct`.
* backend/rust-compile-asm.h: Remove unused `translated` member.
* backend/rust
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-collect-lang-items.cc (CollectLangItems::visit): New.
* ast/rust-collect-lang-items.h: New.
---
gcc/rust/ast/rust-collect-lang-items.cc | 9 +
gcc/rust/ast/rust-collect-lang-items.h | 1 +
2 files changed, 10 insertions(
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous
std::move
---
gcc/rust/ast/rust-ast.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 25e5
From: Arthur Cohen
This commit adds two new constructors for AST::PathInExpression: One using a
provided lang-item, and one with an already built std::unique_ptr
gcc/rust/ChangeLog:
* ast/rust-path.h: Add two new constructors.
---
gcc/rust/ast/rust-path.h | 21 -
1
From: Philip Herron
These hir nodes have optional expressions which need guarded
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::do_qualifiedpathtype): add guard
(Dump::do_traitfunctiondecl): likewise
(Dump::visit): likewise
Signed-off-by: Philip Herron
---
gcc/rust
86 matches
Mail list logo