From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit): Use std::ignore.
---
.../errors/borrowck/rust-bir-builder-expr-stmt.cc | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/r
From: Pierre-Emmanuel Patry
Wrap the return type with an optional and make the return type a pair
with the parent hid.
gcc/rust/ChangeLog:
* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
Adapt code around new return type.
* checks/errors/rust-cons
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_generic_param): Change
call site to accomodate the new return type.
(Mappings::lookup_hir_generic_param): Wrap the function's re
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional in order to
differentiate null pointers from missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_self_param): Adapt call
site to new return type.
(Mappings::lookup_
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc
(check_match_scrutinee): Add assertion.
* backend/rust-compile-pattern.cc
(CompilePatternCheckExpr::visit):
Handle HIR::PathInExpression matching a non-enum.
gcc/testsuite/ChangeLog:
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional.
gcc/rust/ChangeLog:
* typecheck/rust-autoderef.cc: Adapt calling code to new return type.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Likewise.
(TypeCheckExpr::resol
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional to differentiate
between a null pointer and a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_struct_field): Change
call site to accomodate new return type.
(Ma
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional in order to
differentiate missing values from null pointers.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_stmt): Change call site
to accomodate new return type.
(Mappings::
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Fix visitor-related warnings
* ast/rust-ast-collector.h: Likewise.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
* ast/rust-ast-visitor.h: Likewise.
From: badumbatish
First scan with "rg -v '\\r' gcc/testsuite/rust | rg 'dg-output'"
gcc/testsuite/ChangeLog:
* rust/execute/torture/issue-2187.rs:
Update pattern with \r* for dg-output tests
* rust/execute/xfail/macro1.rs: Likewise
---
gcc/testsuite/rust/execute/torture
From: Marc Poulhiès
The visitor was still using the as_string() method.
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::do_matcharm): New.
(Dump::do_matchcase): New.
(Dump::visit(MatchExpr)): Adjust, don't use as_string.
* hir/rust-hir-dump.h (Dump::do_matcharm
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-fmt.h (enum ParseMode):
Drop typedef in Cpp
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs:
Remove repr(C)
* libformat_parser/src/bin.rs: Use ffi
* libformat_parser/src/lib
From: jjasmine
Added tl::expected to parse_operand by implementing the validation
inside the parse_reg_operand function.
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Added tl::expected to parse_operand
* expand/rust-macro-builtins-asm.cc (parse_reg): Likewise.
(parse_r
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.h (enum InlineAsmParseError):
Add WARN_UNUSED_RESULT parse error
(enum WARN_UNUSED_RESULT): Likewise.
Signed-off-by: badumbatish
---
gcc/rust/expand/rust-macro-builtins-asm.h | 3 ++-
1 file changed, 2
From: Owen Avery
This runs the standard compile/**.rs tests
with name resolution 2.0 enabled. The exclude file
can be used to exclude tests which are not yet working
with name resolution 2.0.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/compile.exp: New test.
* rust/compile/nr2/e
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit): Remove some empty overloads which
DefaultASTVisitor::visit should be able to handle.
* resolve/rust-default-resolver.h
(DefaultResolver::visit): Likewise.
gc
From: Pierre-Emmanuel Patry
We did not check the optional was valid, this lead to rogue dereference
and undefined behaviors.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add optional
check.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resol
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Visit GenericArgs and GenericArg, the former
because the latter involves a non-virtual member function call.
* resolve/rust-late-name-resolver-2.0.h
(Late::visit):
From: Philip Herron
When we are typechecking the impl block for DerefMut for &mut T
the implementation follows the usual operator overload check
but this ended up just resolving directly to the Trait definition
which ends up being recursive which we usually handle. The issue
we had is that a dere
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: Philip Herron
This catch to inject inference variables into generic paths was a
catch all 'hack' that we needed before we handled generics correctly
as we do now.
Fixes #3009
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc
(TypeCheckExpr::resolve_segments): remove ha
From: Owen Avery
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check.cc: Add includes.
(TraitItemReference::get_type_from_fn): Use
ForeverStack::to_canonical_path when name resolution 2.0 is
enabled.
Signed-off-by: Owen Avery
---
gcc/rust/typecheck/rust-hir-typ
From: Owen Avery
gcc/testsuite/ChangeLog:
* rust/compile/nr2/compile.exp: Handle paths using "file join"
and "file split".
* rust/compile/nr2/exclude: Remove debug-diagnostics-on.rs.
Signed-off-by: Owen Avery
---
gcc/testsuite/rust/compile/nr2/compile.exp | 18
From: Owen Avery
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-resolve.cc: Add includes.
(TraitResolver::resolve_path_to_trait):
Use name resolution 2.0 resolver when enabled.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-by:
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: 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: 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: 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
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: 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
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
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
If additional trait bounds aren't auto traits, then the typechecker
must error out (Rust-GCC#3008)
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc: Add TODO note.
---
gcc/rust/typecheck/rust-hir-type-check-type.cc | 5 +
1 file changed, 5 inser
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
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: Owen Avery
Since our bootstrap requirement has been bumped to C++14, we don't need
a custom implementation of std::make_unique anymore.
gcc/rust/ChangeLog:
* ast/rust-ast-builder-type.cc: Remove inclusion of
rust-make-unique.h.
* ast/rust-ast-builder.cc: Likewise.
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-item.h: Add EnumItem::Kind for differentiating all variants
that may be
used inside an enum declaration.
---
gcc/rust/ast/rust-item.h | 52
1 file changed, 52 insertions(+)
diff --git a
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: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
Add debug comment
(CompileAsm::asm_construct_outputs):
Perform lowering hir output operand to tree
---
gcc/rust/backend/rust-compile-asm.cc | 12 +++-
1 file
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
(BorrowCheckerDiagnostics::report_move_errors): Specify
locations for code causing errors and related moves.
gcc/testsuite/ChangeLog:
* rust/borrowck/test_move.rs: T
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: Arthur Cohen
gcc/rust/ChangeLog:
* typecheck/rust-tyty-call.h: Remove unused context member.
---
gcc/rust/typecheck/rust-tyty-call.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gcc/rust/typecheck/rust-tyty-call.h
b/gcc/rust/typecheck/rust-tyty-call.h
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
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: 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: Pierre-Emmanuel Patry
FnParam type where monomorphized during cloning.
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h: Reverse monomorphization during cloning and
make a new function to explicitly monomorphize.
* typecheck/rust-tyty.cc: Use monomorphization when requi
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Visit the initialization expressions of let
statements before visiting their patterns.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-b
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: Owen Avery
This removes a usage of Resolver::get_unit_type_node_id in
rust-hir-type-check-expr.cc (the HIR::TupleExpr overload of
TypeCheckExpr::visit).
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc
(TupleType::get_unit_type): Remove parameter, cache return
value.
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: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Prepend crate name to function's ir
name.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove passing tests from exclude list.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/ba
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: 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: 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: 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: 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
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: Philip Herron
This is a special case in Rust and the ! type can unify with pretty much
anything its almost a inference variable and a unit-type for special cases.
Fixes Rust-GCC/gccrs#3231
Fixes Rust-GCC/gccrs#2567
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (check_match_s
From: Arthur Cohen
This is useful for handling multiple trait bounds, and required for better
handling of auto traits.
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Add
implementation for
ParenthesizedType.
* hir/rust-ast-lower-type.h
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.cc
(DefaultASTVisitor::visit): Visit implicit Self parameters of
traits.
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Resolve implicit Self parameters of traits.
* resolve/rust-
From: Nobel
gccrs now should be able to cast float types as numeric.
gcc/rust/ChangeLog:
* typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
gcc/testsuite/ChangeLog:
* rust/compile/cast_float_as_integer.rs: New test.
Signed-off-by: Nobel Singh
---
gcc/rust/type
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: 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
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
From: Arthur Cohen
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc
(TypeCheckType::resolve_root_path):
Remove unused capture in lambda.
---
gcc/rust/typecheck/rust-hir-type-check-type.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): New.
* resolve/rust-late-name-resolver-2.0.h: New.
---
.../resolve/rust-late-name-resolver-2.0.cc| 20 +++
.../resolve/rust-late-name-resolver-2.0.h | 1 +
2
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.cc
(DefaultASTVisitor::visit): When visiting a TraitImpl, visit its
trait path.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
Signed-off-by: Owen Avery
---
gcc/rust/ast/rust-as
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
Some failures occur in the testsuite because we
did not account for the little-endian case.
gcc/testsuite/ChangeLog:
* rust/compile/issue-1446.rs: Add swap_bytes function.
* rust/compile/iterators1.rs: Remove unused {to, from}_le functions.
---
gcc/testsuite
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
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
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Fix collector to
better
handle lang item type path segments.
---
gcc/rust/ast/rust-ast-collector.cc | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff
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
From: Arthur Cohen
This method errors out if the lang item has not been declared yet.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::get_lang_item_node): New.
* util/rust-hir-map.h: New function.
---
gcc/rust/util/rust-hir-map.cc | 10 ++
gcc/rust/util/rust-hir
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-path.h: Adapt children of Path to fix some NodeId issues.
---
gcc/rust/ast/rust-path.h | 76 +++-
1 file changed, 37 insertions(+), 39 deletions(-)
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust
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: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Insert a definition for Self when visiting
InherentImpl and TraitImpl instances.
* resolve/rust-toplevel-name-resolver-2.0.h
(TopLevel::visit): Add visitor
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
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: liushuyu
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc: add the new `catch_unwind` variant
of the `try` intrinsic: this variant can be seen on Rust 1.78+
and returns `()` instead of `i32`.
---
gcc/rust/backend/rust-compile-intrinsic.cc | 57 +++
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Add failing lang item typepaths tests.
* rust/execute/torture/derive_macro4.rs: Mark Clone as lang item.
---
gcc/testsuite/rust/compile/nr2/exclude | 5 +
gcc/testsuite/rust/execute/torture
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: CohenArthur
This reverts commit 600fd806b8821ea24103ea0f31d666077245c6b7.
---
gcc/rust/ast/rust-collect-lang-items.cc | 7 ++-
gcc/rust/util/rust-attributes.cc| 8
gcc/rust/util/rust-attributes.h | 2 --
3 files changed, 6 insertions(+), 11 deletions(-)
diff -
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-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: Arthur Cohen
gcc/rust/ChangeLog:
* Make-lang.in: Add new object file.
* rust-session-manager.cc (Session::compile_crate): Call
CollectLangItems.
* ast/rust-collect-lang-items.cc: New file.
* ast/rust-collect-lang-items.h: New file.
---
gcc/rust/Make
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Handle StructExprStruct and use
ForeverStack::resolve_path instead of ForeverStack::get to
resolve struct expression paths.
* resolve/rust-late-name-resolver-2.0.h
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
From: Philip Herron
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::visit): add missing null checks
Signed-off-by: Philip Herron
---
gcc/rust/hir/rust-hir-dump.cc | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rus
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: 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
From: Arthur Cohen
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc
(TypeCheckType::resolve_root_path): Adapt
code to handle lang item type paths.
---
.../typecheck/rust-hir-type-check-type.cc | 26 ---
1 file changed, 17 insertions(+), 9
From: Arthur Cohen
gcc/rust/ChangeLog:
* util/rust-hir-map.h: Keep a NodeId mappings for lang items.
* util/rust-hir-map.cc (Mappings::insert_lang_item_node): New function.
(Mappings::lookup_lang_item_node): Likewise.
---
gcc/rust/util/rust-hir-map.cc | 22
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
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Change call.
(CompileExpr::resolve_operator_overload): Update function arguments.
* backend/rust-compile-expr.h: Change the function's prototype to use
a reference
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc: New functions.
* ast/rust-ast-builder.h: Declare them.
---
gcc/rust/ast/rust-ast-builder.cc | 57 ++--
gcc/rust/ast/rust-ast-builder.h | 13 +++-
2 files changed, 67 insertions
From: Arthur Cohen
These lang items are used when deriving Eq and PartialEq, and will be checked
when compiling pattern matching.
gcc/rust/ChangeLog:
* util/rust-lang-item.cc: New items.
* util/rust-lang-item.h: Likewise.
gcc/testsuite/ChangeLog:
* rust/compile
From: Arthur Cohen
gcc/rust/ChangeLog:
* Make-lang.in: Compile it.
* ast/rust-desugar-question-mark.cc: New file.
* ast/rust-desugar-question-mark.h: New file.
gcc/testsuite/ChangeLog:
* rust/compile/try-expr1.rs: New test.
---
gcc/rust/Make-lang.in
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx
(ForeverStack::dfs_rib): Fix const implementation.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-forever-stack.hxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/reso
From: Philip Herron
It seems bounds in qualified paths are not allowed to specify associated
type bindings because its going to be associated with the impl block
anyway.
Fixes Rust-GCC#2369
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-base.h: add flag
* typecheck/rust-hi
701 - 800 of 1384 matches
Mail list logo