From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc: New methods.
* ast/rust-ast-builder.h: Declare them.
---
gcc/rust/ast/rust-ast-builder.cc | 62
gcc/rust/ast/rust-ast-builder.h | 36 +--
2 files changed, 96 inser
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
inde
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc: Use new SubstituteCtx API.
* expand/rust-macro-expand.h: Likewise.
* expand/rust-macro-substitute-ctx.cc: Implement proper expansion of
$crate.
* expand/rust-macro-substitute-ctx.h: Adapt APIs
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:
* util/rust-lang-item.cc (LangItem::IsEnumVariant): New function.
* util/rust-lang-item.h: Declare it.
---
gcc/rust/util/rust-lang-item.cc | 9 +
gcc/rust/util/rust-lang-item.h | 5 -
2 files changed, 13 insertions(+), 1 deleti
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc
(Early::resolve_glob_import): Use
NameResolutionContext::resolve_path instead of
ForeverStack::resolve_path.
(Early::visit): Likewise.
(Early::visit_attributes): Likewis
From: Pierre-Emmanuel Patry
Query mode was a hack to catch up some compile errors early, it was
deemed to be removed at some time. Recent changes to NR1 highlighted
an incompatibility with it hence it's removal.
gcc/rust/ChangeLog:
* backend/rust-compile-item.h: Remove query mode.
From: Philip Herron
It is valid for the query to fail here so its valid to not assert here.
gcc/rust/ChangeLog:
* typecheck/rust-hir-path-probe.cc (PathProbeType::visit): remove
assertion
Signed-off-by: Philip Herron
---
gcc/rust/typecheck/rust-hir-path-probe.cc | 12 ++--
1
From: Philip Herron
When passing generics around we try to adjust them because there are cases
where the names are adjusted from other generics this can fail for traits
because of the implicit Self and we just need to continue on without
adjustment.
Fxies Rust-GCC#3382
gcc/rust/ChangeLog:
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: 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: Pierre-Emmanuel Patry
Enum variants shouldn't be accessed directly even from within an enum.
This commit keeps the provenance for enum variants definition so we
can skip them when resolving a value within an enum definition.
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Add
From: Ryutaro Okada <1015ry...@gmail.com>
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-implitem.cc
(TypeCheckTopLevelExternItem::visit):
emit an error for type or const parameters on foreign items
gcc/testsuite/ChangeLog:
* rust/compile/extern_generics.rs
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Call DefaultResolver::visit earlier, in order to
ensure it is called even if Late::visit returns early.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entri
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:
* 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 insertio
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: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive.cc (DeriveVisitor::derive): Call DeriveDefault.
* expand/rust-derive-default.cc: New file.
* expand/rust-derive-default.h: New file.
* Make-lang.in: Compile them.
gcc/testsuite/ChangeLog:
* rust
From: Pierre-Emmanuel Patry
Labels were using the wrong namespace.
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Change label
push function from type rib to label rib.
* resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit):
L
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-path.h
(PathInExpression::get_pattern_node_id): Remove.
Signed-off-by: Owen Avery
---
gcc/rust/ast/rust-path.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index c253703
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:
* expand/rust-derive.cc (DeriveVisitor::derive): Return a vector of
items.
* expand/rust-derive.h: Change return type.
* expand/rust-expand-visitor.cc: Insert all generated items into the
AST.
---
gcc/rust/expand/rust-derive.cc
From: Arthur Cohen
Collapses all of the OperatorExprs into Expr instead of first having to check
for OperatorExpr and
then check for each OperatorExpr::Kind.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add new Expr::Kinds.
* ast/rust-expr.h: Implement missing get_expr_kind(), Add
ge
From: Philip Herron
Fixes Rust-GCC#3174
gcc/rust/ChangeLog:
* backend/rust-compile-pattern.cc (CompilePatternBindings::visit): make
recursive
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
handle ref flag
gcc/testsuite/ChangeLog:
* rust/compile
From: Arthur Cohen
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc: Check unique_ptr members are present before
visiting them.
* hir/tree/rust-hir-path.h: Add `has_{type, trait}` methods to
QualifiedPathInType.
---
gcc/rust/hir/rust-hir-dump.cc | 19 ++
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-lower
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: 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: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-collect-lang-items.h: Declare visitor.
* ast/rust-collect-lang-items.cc (CollectLangItems::visit): New.
---
gcc/rust/ast/rust-collect-lang-items.cc | 9 +
gcc/rust/ast/rust-collect-lang-items.h | 1 +
2 files changed, 10
From: Philip Herron
Our AST has ImplTraitType for multiple bounds and a singular
ImplTraitTypeOneBound, this patch desugars these into a simple
HIR::ImplTraitType. It also does the name resolution for this.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-struct.h: remove
From: Pierre-Emmanuel Patry
We're reusing the value, it could therefore not be taken be should be
cloned.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit):
Clone expr instead of taking it.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/
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: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Special case
lang item paths.
---
gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/resolve/rust-late-name-re
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc
(ResolveRelativeTypePath::go): Adjust error message to match
the 2.0 name resolver.
gcc/testsuite/ChangeLog:
* rust/compile/additional-trait-bounds2.rs: Adjust expected
errors.
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-derive-partial-eq.cc: Adapt signatures to generate two
impls.
* expand/rust-derive-partial-eq.h: Likewise.
* expand/rust-derive.cc (DeriveVisitor::derive): Adapt to multiple item
generation.
gcc/testsuite/ChangeLog:
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
From: Philip Herron
We can have a case where the placeholder is not configred and the
can_resolve check is not detecting this case which can lead to ICE.
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc (PlaceholderType::can_resolve): check for
empty mappings
Signed-off-by: Philip Herron
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 f
From: Pierre-Emmanuel Patry
We might have some duplicated name in some pattern and we should
therefore not assert the non duplication of identifiers.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
assertion and explicitely tells why we ignore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108124
Sam James changed:
What|Removed |Added
Blocks||86656, 63426
Keywords|
From: lishin
Add and implement a lang item (receiver) in source code.
gcc/rust/ChangeLog:
* util/rust-lang-item.cc: Add receiver to map.
* util/rust-lang-item.h: Define LangItem::Kind::RECEIVER.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2954.rs: New test.
Signed-o
Hi everyone!
Here is the last batch of our split patchset which aimed at
synchronizing upstream with our development repo. Both repositories are
now the same, with the latest patch pushed today corresponding to the
latest pull-request merged this weekend on our side. Moving forward,
I will be upst
101 - 142 of 142 matches
Mail list logo