From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-dump.cc (Dump::visit): Use new
API, i.e get_loan_id() instead of get_loan().
* checks/errors/borrowck/rust-bir-fact-collector.h (points): Use
value of LoanId in Polonius facts.
* checks
From: Kushal Pal
Mapped placeholder regions to their respective HIR nodes so we can fetch
locations during error reporting.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder.h: Map regions to
their respective HIR nodes.
* checks/errors/borrowck/rust-bir.h (st
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: Arthur Cohen
This method was used only for stripping PathPattern AST nodes during
`cfg-strip`, which seems like a misnomer and makes it a good candidate
for simplification.
gcc/rust/ChangeLog:
* ast/rust-path.h (class PathInExpression): Remove `remove_all_segments`
method
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: jjasmine
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit):
Setting up interfaces for codegen
* hir/tree/rust-hir-expr.h: Likewise.
---
gcc/rust/backend/rust-compile-expr.cc | 6 --
gcc/rust/hir/tree/rust-hir-expr.h | 26 +
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: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
Set up counting to check
---
gcc/rust/backend/rust-compile-asm.cc | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/backend/rust-compile-asm.cc
b/gcc/rust/
From: jjasmine
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit):
Local testing for build_string and debug()
---
gcc/rust/backend/rust-compile-expr.cc | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/backend/rust-compile-expr
From: Kushal Pal
This commit adds location_t to BIR::Statement where type is ASSIGNMENT
this information will be later used for reporting borrow-checking
errors.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit): Added location p
From: Arthur Cohen
This commit adds basic handling for the `#[prelude_import]` attribute,
without doing anything functionality wise.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add base
feature gating for `#[feature(prelude_import
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: badumbatish
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::visit):
Change API, public/private, comments, formatting from code
review
(CompileAsm::asm_build_expr): Likewise.
(CompileAsm::tree_codegen_asm): Likewise.
* backend/r
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/rust-hir-pattern-analysis.cc: Add includes.
(PatternChecker::visit): Use name resolver 2.0 when enabled.
Signed-off-by: Owen Avery
---
.../checks/errors/rust-hir-pattern-analysis.cc | 16 +++-
1 file changed, 1
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-dump.cc (renumber_places):
Use value of PlaceId as index.
(Dump::visit_place): Likewise.
(Dump::visit_scope): Likewise.
(Dump::go): Refill `place_map` with for loop instead of
u
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* resolve/rust-finalize-imports-2.0.h: Add parent member functions
from default resolver.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resolve/rust-finalize-imports-2.0.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-place.h:
Used `IndexVec` with ScopeId as index.
Signed-off-by: Kushal Pal
---
.../checks/errors/borrowck/rust-bir-place.h | 25 +--
1 file changed, 12 insertions(+), 13 deletions(-)
diff
From: Kushal Pal
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::setup_loop): Use value of ScopeId.
(ExprStmtBuilder::visit): Use continue scope id instead of
continue basic block id.
* checks/errors/borrowck/ru
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/rust-const-checker.cc: Add includes.
(ConstChecker::visit): Use name resolver 2.0 to lookup
function definitions when name resolution 2.0 is enabled.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove
From: Pierre-Emmanuel Patry
Box definition is part of the standard library and cannot be found during
name resolution. This simple definition prevent any error from being
emitted.
gcc/testsuite/ChangeLog:
* rust/compile/box_syntax_feature_gate.rs: Add box land item
definition.
From: Pierre-Emmanuel Patry
Optional are more convenient to use and avoid uninitialized data.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::generate_closure_function):
Adapt code for new optional return type.
* checks/errors/privacy/rust-privacy-report
From: Pierre-Emmanuel Patry
Previous API was using a boolean and a pointer, this was not practical
and could be replaced with an optional.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Change call to use
the returned optional.
(CompileExpr::gen
From: Pierre-Emmanuel Patry
Change the return type to an optional instead of returning a null
pointer. This allows easier tracking of rogue null pointers in the
map. This commit also fixes a bug in trait associated function mangling,
the function was using an already invalidated pointer.
gcc/rus
From: Nobel Singh
gcc/testsuite/ChangeLog:
* rust/compile/issue-2906.rs: New test.
* rust/execute/torture/issue-2906.rs: New test.
Signed-off-by: Nobel Singh
---
gcc/testsuite/rust/compile/issue-2906.rs | 10 ++
.../rust/execute/torture/issue-2906.rs| 34 +
From: Pierre-Emmanuel Patry
Change the function's return type to use an optional.
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-toplevel.h: Adapt the code to the new
return type.
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
Likewise.
*
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h:
Scaffolding HIRFullVisitor for inline asm
* ast/rust-ast.cc (InlineAsm::accept_vis): Likewise.
* hir/tree/rust-hir-visitor.h (RUST_HIR_VISITOR_H): Likewise.
* hir/tree/rust-hir.cc (InlineAsm::acc
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: dave
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Check
for ?Trait in visitor
gcc/testsuite/ChangeLog:
* rust/compile/issue-2725.rs: New test.
Signed-off-by: Dave Evans
---
gcc/rust/typecheck/rust-hir-type-check-item.cc | 18
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmRegOrRegClass):
Remove union
(struct InlineAsmOperand): Make instances of inside struct.
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
Change signature with inlineAsmCtx.
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:
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
Partial unsafe support for inline asm
* checks/errors/rust-unsafe-checker.h: Likewise.
* hir/tree/rust-hir-expr.h: Likewise.
* hir/tree/rust-hir.cc (InlineAsm
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: 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
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: 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: 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
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
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
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
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
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
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
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: 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
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
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-
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
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:
* 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
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
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: 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
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
701 - 800 of 1405 matches
Mail list logo