From: Philip Herron
Rust allows you to use generics within type bounds when they are declared
later on. This changes the name resolution to walk the genric params
in two passes to ensure the type parameters are setup before drilling down
into the type parameters
This issue has exposed another ty
From: Pierre-Emmanuel Patry
Those function should not change anything within the foreverstack, it
can therefore be made const.
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Make debug functions const.
* resolve/rust-forever-stack.hxx: Likewise.
Signed-off-by: Pierre-Emman
From: Owen Avery
Some of our tests only work with name resolution 2.0 because the latter
misinterprets type paths. This change should cause the compiler to error out
if it would otherwise misinterpret a type path. A fix for type path
resolution isn't included in this comment, since doing so would
From: Liam Naddell
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-utility.cc: Add macro expansion for
option_env with eager expansion
* expand/rust-macro-builtins.cc: Add option_env to builtin list
* expand/rust-macro-builtins.h: Add option_env handler to header
From: Philip Herron
This was fixed as part of: "gccrs: Fix compilation of trait-items which map to
impl items"
Fixes Rust-GCC#3402
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: nr2 cant handle this
* rust/compile/issue-3402-1.rs: New test.
* rust/compile/issue-3
From: Dylan Gardner
Fixes #3129.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::handle_crate_name): Remove
crate name inference
(Session::compile_crate): Add crate name inference and error if
inferred name is empty. Remove CompileOptions::get_instance ()
From: Arthur Cohen
gcc/rust/ChangeLog:
* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add base
implementation
for visitor.
---
gcc/rust/hir/rust-ast-lower-base.cc | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/hir/rust-ast
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-eq.cc: Adapt functions to return two generated
impls.
* expand/rust-derive-eq.h: Likewise.
* expand/rust-derive.cc (DeriveVisitor::derive): Likewise.
---
gcc/rust/expand/rust-derive-eq.cc | 68
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-eq.cc: Copy `Eq` typepath.
---
gcc/rust/expand/rust-derive-eq.cc | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/expand/rust-derive-eq.cc
b/gcc/rust/expand/rust-derive-eq.cc
index 47a8350d2ff
From: Arthur Cohen
gcc/rust/ChangeLog:
* Make-lang.in: Compile it.
* expand/rust-derive.cc (DeriveVisitor::derive): Call it.
* expand/rust-derive-hash.cc: New file.
* expand/rust-derive-hash.h: New file.
gcc/testsuite/ChangeLog:
* rust/compile/derive
From: GS-GOAT <86884129+gs-g...@users.noreply.github.com>
gcc/rust/ChangeLog:
* typecheck/rust-autoderef.cc
(insert_implicit_type): Update single-parameter call to
pass explicit HirId.
* typecheck/rust-hir-type-check-expr.cc: Same.
* typecheck/rust-hir-type
From: Arthur Cohen
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Call
DesugarQuestionMark::go().
---
gcc/rust/rust-session-manager.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx
(ForeverStack::find_starting_point): Stop when hitting a lang
item segment.
(ForeverStack::resolve_segments): Resolve lang item segments.
(ForeverStacl::resolve_path): Handle single segm
From: Arthur Cohen
gcc/rust/ChangeLog:
* checks/lints/rust-lint-scan-deadcode.h: Check if the field name
starts with an
underscore before warning.
---
gcc/rust/checks/lints/rust-lint-scan-deadcode.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/rust
From: Philip Herron
When we have paths such as Try::from_error the Try references the Trait
and then from_error references the from_error trait item. So this resolves
directly to a trait implementation which has the type:
fn (v: placeholder) -> Self
Remember that a path such as: Try::from_er
From: Philip Herron
Just a small refactor to remove a visitor which is not needed.
gcc/rust/ChangeLog:
* backend/rust-compile-resolve-path.cc (ResolvePathRef::Compile):
remove visitor
(ResolvePathRef::ResolvePathRef): likewise
(ResolvePathRef::visit): likewise
*
From: Pierre-Emmanuel Patry
New enum variant status now appears in the string representation of
the resolver's definition.
gcc/rust/ChangeLog:
* resolve/rust-rib.cc (Rib::Definition::to_string): Add enum variant
status.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resolv
From: Philip Herron
Addresses Rust-GCC#3348
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (variant_count_handler): new
intrinsic
gcc/testsuite/ChangeLog:
* rust/execute/torture/enum_intrinsics2.rs: New test.
Signed-off-by: Philip Herron
---
gcc/rust/backend/rust-
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc:
Include rust-attribute-values.h.
(Early::visit): If a module has a macro_use attribute, avoid
pushing a new textual macro scope.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/e
From: Philip Herron
This was a bad diagnostic added when I was working on slices and iterators
also the name of the function is also bad. This is all about setting up
associated types based on the current context of the bounds assocated with
the associated trait bounds on this function.
The tell
From: Pierre-Emmanuel Patry
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/nr2/exclude | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/testsuite/rust/compile/nr2/exclude
b/gcc/testsuite/rust
From: Philip Herron
This will be crucial for more complex gimple debugging to make it easier
to follow the code vs the original rust code.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): disable overflow
checks
* lang.opt: new flag
Signed-off-by: Phili
From: Philip Herron
Addresses Rust-GCC#3382 and Rust-GCC#3381
gcc/rust/ChangeLog:
* typecheck/rust-type-util.cc (coercion_site): allow inference vars
gcc/testsuite/ChangeLog:
* rust/compile/reference1.rs: fix error message
Signed-off-by: Philip Herron
---
gcc/rust/typecheck
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive.cc (DeriveVisitor::setup_impl_generics): New
method.
* expand/rust-derive.h: Declare it, define DeriveVisitor::ImplGenerics
struct.
---
gcc/rust/expand/rust-derive.cc | 74 ++
gcc/rust
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc (Builder::type_path): New functions.
* ast/rust-ast-builder.h: Declare them.
---
gcc/rust/ast/rust-ast-builder.cc | 21 -
gcc/rust/ast/rust-ast-builder.h | 4
2 files changed, 24
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-desugar-for-loops.cc: New file.
* ast/rust-desugar-for-loops.h: New file.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Make lowering of
for-loops an
unreachable.
* Make-lang.in: Compile it.
gcc
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc
(CompileExpr::generate_closure_function): Take
NameResolutionContext by reference instead of by value.
* backend/rust-compile-item.cc
(CompileItem::visit): Likewise.
* backend/rust
From: Arthur Cohen
Some empty overrides were incorrectly being set-up instead of using the correct
behavior
from DefaultASTVisitor.
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver.cc: Remove definitions.
* resolve/rust-early-name-resolver.h: Remove declarations
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc: Cleanup using
DeriveVisitor::setup_impl_generics.
* expand/rust-derive-copy.cc: Likewise.
---
gcc/rust/expand/rust-derive-clone.cc | 87 ++--
gcc/rust/expand/rust-derive-copy.cc | 87
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (strip_double_quotes): Special case
empty
strings ("\"\"").
(parse_reg_operand): Remove use of the `struct` keyword.
(parse_reg_operand_in): Likewise.
(p
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx
(ForeverStack::resolve_segments): Add comments explaining
the behaviour of a while loop.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-forever-stack.hxx | 11 +++
1 file changed, 11 ins
From: Pierre-Emmanuel Patry
Those test are now passing.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove passing tests.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/nr2/exclude | 11 ---
1 file changed, 11 deletions(-)
diff --git a/gcc/tests
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): When visiting an external crate declaration,
handle failed crate name lookups. This can happen when
Session::load_extern_crate fails to load a crate during the
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.cc
(DefaultASTVisitor::visit): Make sure to always visit the struct
name.
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Avoid visiting the struct name twice.
gcc/testsuite/ChangeLog:
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Make sure to return early after a resolution
error, improve the resolution error message, fix a typo, handle
ambiguous resolutions, and remove an old comment.
gcc/testsui
From: Pierre-Emmanuel Patry
We already lost some time on this unusual pattern, a comment will
hopefully prevent this from happening again.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
warning about current code.
Signed-off-by: Pierre-E
From: Owen Avery
gcc/rust/ChangeLog:
* util/rust-unwrap-segment.cc: New file.
* util/rust-unwrap-segment.h: New file.
* Make-lang.in: Add rust-unwrap-segment.o to the object list.
* resolve/rust-forever-stack.hxx: Include rust-unwrap-segment.h.
(ForeverSta
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-debug.cc: New file.
* expand/rust-derive-debug.h: New file.
* Make-lang.in: Compile them.
* expand/rust-derive.cc (DeriveVisitor::derive): Call into DeriveDebug.
gcc/testsuite/ChangeLog:
* rust
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::lookup_crate_num): Add function to
retrieve crate number from it's node id.
(Mappings::node_is_crate): change function with call to
lookup_crate_num to avoid looping through all crat
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
From: Sahil Yeole
contrib/ChangeLog:
* update-copyright.py: Add libgrust folder.
Signed-off-by: Sahil Yeole
---
contrib/update-copyright.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py
index 0e45609d5eb..838c44f33eb 100
From: Arthur Cohen
ChangeLog:
* .gitignore: Add libgrust target folders to the ignore list.
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index f044fe16b5f..7150fc3b29c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,6 @@ stamp
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/polonius/rust-polonius.h (struct FullPoint):
Polonius facts dump.
(struct Facts): Polonius facts dump.
* checks/errors/borrowck/rust-bir-dump.cc (Dump::go):
Polonius facts dump.
(Dump::
From: Jakub Dupak
gcc/rust/ChangeLog:
* Make-lang.in: Link Polonius.
* checks/errors/borrowck/rust-borrow-checker.cc: Run Polonius.
Signed-off-by: Jakub Dupak
---
gcc/rust/Make-lang.in | 9 ++---
gcc/rust/checks/errors/borrowck/rust-borrow-
From: Jakub Dupak
gcc/testsuite/ChangeLog:
* rust/borrowck/borrowck.exp: New test.
* rust/borrowck/position_dependant_outlives.rs: New test.
* rust/borrowck/reference.rs: New test.
* rust/borrowck/return_ref_to_local.rs: New test.
* rust/borrowck/subset.rs
From: zhanghe9702
gcc/rust/ChangeLog:
* backend/rust-tree.h: removing the CLASSTYPE_VBASECLASSES macro
which is duplicated three times.
Signed-off-by: Zhang He
---
gcc/rust/backend/rust-tree.h | 12
1 file changed, 12 deletions(-)
diff --git a/gcc/rust/backend/rus
From: Jakub Dupak
This is minimalistic version to build Polonius with Cargo.
gcc/rust/ChangeLog:
* Make-lang.in: Build Polonius.
Signed-off-by: Jakub Dupak
---
gcc/rust/Make-lang.in | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.
From: Pierre-Emmanuel Patry
The raw ref operator is an unstable feature required to obtain a pointer
to unaligned adresses (mainly unaligned struct fields) without UB.
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc (Builder::ref): Adapt constructor to the new
API.
* ast/r
From: Pierre-Emmanuel Patry
Add a new feature gate for may_dangle generic param outer attributes.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc: Visit and gate may_dangle
attributes.
* checks/errors/rust-feature-gate.h: Update visit function prototype
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi): title.
(parseAsmArg): title.
* expand/rust-macro-builtins-asm.h (parse_clobber_abi): title.
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 76 +-
gcc/rust/ex
From: jjasmine
Finish up on parse_option, formatted parse_clobber_abi
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi): format
(check_and_set): helper function, is try_set_option equivalent
(parse_options): new function
* expand/rust-mac
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmRegOrRegClass):
Scaffolding parse_reg
* expand/rust-macro-builtins-asm.cc (parse_reg): Likewise.
(parse_operand): Likewise.
(parseAsmArg): Likewise.
---
gcc/rust/ast/rust-expr.h
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_nop.rs: Simple test for asm!
---
gcc/testsuite/rust/compile/inline_asm_nop.rs | 10 ++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_nop.rs
diff --git a/gcc/testsuite/
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h: Introduced is_global_asm to InlineAsm AST
---
gcc/rust/ast/rust-expr.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index a5afbffee99..84fb5e8ab33 100644
--- a/gcc/rust/ast/r
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (enum InlineAsmRegOrRegClass):
title.
(parseAsmArg): title.
(check_identifier): title.
(parse_operand): title.
(parse_options): title.
(parse_reg): title.
(parseDirSpec
From: Pierre-Emmanuel Patry
Previously generic params only allowed one outer attribute in front of
them.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Visit outer
attributes.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Change outer
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h: Make InlineAsm non-abstract for usage in parsing.
---
gcc/rust/ast/rust-expr.h | 44
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_options): title.
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc
b/gcc/rust/expand/
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_nop_2.rs: New test.
---
gcc/testsuite/rust/compile/inline_asm_nop_2.rs | 10 ++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_nop_2.rs
diff --git a/gcc/testsuite/rust/
From: jjasmine
Replace scaffolded InlineAsm with real InlineAsm node in rust-expr.h
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parseDirSpec): replace
scaffolded InlineAsm with real InlineAsm.
(parse_clobber_abi): likewise.
(check_and_set): likewise.
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
implemented parse_clobber_abi
(parse_format_string): likewise.
(parseAsmArg): likewise.
(parse_asm): likewise.
* expand/rust-macro-builtins-asm.h (parseAsmA
From: jjasmine
This is without any mutually exclusive options checked, or
any relationship with reg_operands. Very primitive.
gcc/rust/ChangeLog:
* ast/rust-expr.h: parsing of options(...)
* expand/rust-macro-builtins-asm.cc (check_and_set):
likewise.
(parse_opti
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc
(MacroBuiltin::global_asm_handler):
Remove global_asm and non_global_asm handler
(MacroBuiltin::nonglobal_asm_handler): Likewise.
(MacroBuiltin::asm_handler): Likewise.
* expand
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs: New test.
* rust/compile/inline_asm_faulty_clobber_1.rs: New test.
* rust/compile/inline_asm_faulty_clobber_2.rs: New test.
---
.../rust/compile/inline_asm_faulty_clobber.rs | 1
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.h (parseAsmArg):
Resolve static decl warning
(parse_nonglobal_asm):
Resolve static decl warning
---
gcc/rust/expand/rust-macro-builtins-asm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deleti
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg):
Working towards parse_reg and parse_reg_operand
(parse_reg_operand):
Working towards parse_reg and parse_reg_operand
(parse_asm_arg):
Add todo about errors
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct AnonConst):
Got AST::Fragment to be created from InlineAsm.
(struct InlineAsmOperand): Likewise.
(class InlineAsm): Likewise.
* expand/rust-macro-builtins-asm.cc (parse_reg_operand): Likewise.
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (struct AsmParseError): title.
(enum InlineAsmDirSpec): title.
(enum InlineAsmOptions): title.
(struct AsmArg): title.
(parseAsmArg): title.
(parse_global_asm): title.
(
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs: compress
the test
* rust/compile/inline_asm_nop.rs: compress
the test
* rust/compile/inline_asm_faulty_clobber_1.rs: Removed.
* rust/compile/inline_asm_faulty_clob
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct AnonConst):
major refactoring of inline asm, mostly concerns
naming convention, trinary conditionals, warnings,
adding rust_unreachables in not-yet supported errors.
(struct InlineAsmRegOrRegClas
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs:
Wraps inline_asm tests in unsafe {}
* rust/compile/inline_asm_faulty_clobber_1.rs: likewise.
* rust/compile/inline_asm_faulty_clobber_2.rs: likewise.
* rust/compile/inline
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_ident_first.rs: New test.
---
gcc/testsuite/rust/compile/inline_asm_ident_first.rs | 10 ++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_ident_first.rs
diff --git a/g
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct TupleTemplateStr):
Store parse result of parse_format_string(s)
* expand/rust-macro-builtins-asm.cc (parse_format_strings):
Likewise
Signed-off-by: badumbatish
---
gcc/rust/ast/rust-expr.h
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parseAsmArg):
Renamed parseAsmArg to conform to other function names
(parse_asm_arg): Likewise.
(parse_asm): Likewise.
* expand/rust-macro-builtins-asm.h (parseAsmArg): Likewise.
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi): title.
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc
b/gcc/rust/e
From: Liam Naddell
gcc/rust/ChangeLog:
* expand/rust-expand-visitor.cc:
Fix ICE caused by unique_ptr UB and buggy iterator use
gcc/testsuite/ChangeLog:
* rust/compile/issue-2987.rs:
Add test for deriving Clone and Copy at the same time
Signed-off-by: Liam Naddell
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect):
Added options for ParseMode
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Likewise.
* expand/rust-macro-builtins-format-args.cc
(MacroBuiltin::format_args_handler):
From: Arthur Cohen
Resent to cut out the patch's content, as it did not pass the ML filters.
This fixes PR #119333 by allowing our borrow-checker interface to be built
offline. This was already done for our components in libgrust/, but had never
been
done for the borrow-checker.
From: Philip Herron
Qualified path expressions usually are ::... but the as is optional
this adds the extra checking in hir lowering to not hit that nullptr.
Fixes #3082
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLowerQualifiedPathInType::visit):
check for valid as se
From: Pierre-Emmanuel Patry
Make those functions public so they can be used within a lambda on GCC
4.8.
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h: Make visit functions public.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/ast/rust-ast-visitor.h | 1 -
1 file changed, 1 deletio
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-place.h: Used `IndexVec` with
ScopeId as index.
* checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
(BorrowCheckerDiagnostics::get_loan): Convert Polonius::Loan to
BIR::Loan, so
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-internal.h:
Use `make_*` functions to create BIR::Statements.
* checks/errors/borrowck/rust-bir.h: Make a complete constructor
and introduce `make_*` functions to create various
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit):
Use value of BasicBlockId as index.
* checks/errors/borrowck/rust-bir-builder-internal.h (struct
BuilderContext):
Likewise.
* checks/err
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec):
Add notes on the problem.
* resolve/rust-toplevel-name-resolver-2.0.h: Likewise.
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 11 +++
gcc
From: Owen Avery
gcc/rust/ChangeLog:
* util/rust-canonical-path.h
(CanonicalPath::CanonicalPath): Properly initialize crate_num
with copy constructor.
gcc/testsuite/ChangeLog:
* rust/compile/v0-mangle1.rs: Make v0-mangle test more crate_num
agnostic.
Si
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-internal.h: Use
STATIC_FREE_REGION, use value of FreeRegion for origin.
* checks/errors/borrowck/rust-bir-builder.h: Use free region
value.
* checks/errors/borrowck/rust-bir-dum
From: Kushal Pal
gcc/testsuite/ChangeLog:
* rust/borrowck/test_move.rs: Assigning `a` to `c` is the
correct way to test the behaviour.
Signed-off-by: Kushal Pal
---
gcc/testsuite/rust/borrowck/test_move.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
From: Pierre-Emmanuel Patry
When we tried to insert a shadowable node and another shadowable node has
been inserted before, we didn't emit any error if the node has already
been inserted previously and failed silently.
gcc/rust/ChangeLog:
* resolve/rust-rib.cc (Rib::insert): Emit an err
From: Pierre-Emmanuel Patry
Regular visit code can be replaced with default visit functions.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove
default visit code and replace it with call to default visitor.
* resolve/rust-default-res
From: badumbatish
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Fix parsing logic & reassignment logic
(parse_reg_operand_in): Fix parsing
(parse_reg_operand_out): Fix parsing
(parse_reg_operand_inout): Fix parsing
(p
From: badumbatish
gcc/rust/ChangeLog:
* Make-lang.in:
Scaffolding new compile-asm files
* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise
* hir/tree/rust-hir-expr.h: Likewise
* backend/rust-compile-asm.cc: New file. Likewise
* backend/r
From: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::add_stmt):
Scaffolding code.
(CompileAsm::asm_build_asm_stmt): Likewise.
(CompileAsm::asm_build_expr): Likewise.
(CompileAsm::asm_construct_string_tree): Likewise.
* b
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-place.h: Use strong types as
index.
Signed-off-by: Kushal Pal
---
.../checks/errors/borrowck/rust-bir-place.h | 56 +--
1 file changed, 27 insertions(+), 29 deletions(-)
diff --git a/gcc/
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* ast/rust-ast.h: Node id getter could be const.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/ast/rust-ast.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index
From: badumbatish
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Remove warnings
(parse_reg_operand_out): Remove warnings
(expand_inline_asm): New function for eventual expansion
(parse_asm): Use expand_inline_asm
gcc/testsui
From: Pierre-Emmanuel Patry
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove working tests from nr2 exclude list.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/nr2/exclude | 27 +-
1 file changed, 1 insertion(+), 26 deletions(-)
From: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
Use expr's is_simple_asm and is_inline_asm
(CompileAsm::asm_is_simple): removed
(CompileAsm::asm_is_inline): removed
* backend/rust-compile-asm.h: Add docs to
From: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
Lower the HIR to tree with CompileExpr
* backend/rust-compile-asm.h: Remove static from method
---
gcc/rust/backend/rust-compile-asm.cc | 15 +++
gcc/rust
From: Owen Avery
gcc/rust/ChangeLog:
* checks/lints/rust-lint-marklive.cc
(MarkLive::visit_path_segment): Use name resolver 2.0 when
enabled.
(MarkLive::visit): Likewise.
Signed-off-by: Owen Avery
---
gcc/rust/checks/lints/rust-lint-marklive.cc | 31 +++
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Handle TypeAlias.
* resolve/rust-toplevel-name-resolver-2.0.h
(TopLevel::visit): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove ty
901 - 1000 of 1339 matches
Mail list logo