On Tue, 21 Feb 2023, Thomas Schwinge wrote:
> Is the attached v2
> "Add '-Wno-complain-wrong-lang', and use it in
> 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere"
> OK?
OK.
--
Joseph S. Myers
jos...@codesourcery.com
--
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
Hi!
On 2023-02-21T13:00:53+0100, arthur.co...@embecosm.com wrote:
> --- a/gcc/rust/ast/rust-ast-dump.cc
> +++ b/gcc/rust/ast/rust-ast-dump.cc
> @@ -1,4 +1,4 @@
> -// Copyright (C) 2020-2023 Free Software Foundation, Inc.
> +// Copyright (C) 2020-2022 Free Software Foundation, Inc.
> ---
From: Philip Herron
gcc/rust/ChangeLog:
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove
unused parameters.
* backend/rust-constexpr.cc (constant_value_1): Likewise.
(fold_non_dependent_init): Likewise.
* backend/rust-tree.cc
From: Arthur Cohen
We only used one path of the C++ folder's get_nth_callarg function:
CALL_EXPR_ARG. Replace all calls to get_nth_callarg by macro calls to
CALL_EXPR_ARG
gcc/rust/ChangeLog:
* backend/rust-constexpr.cc (get_nth_callarg): Remove function.
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Pass
captures
properly to `TyTy::ClosureType` constructor.
* typecheck/rust-tyty.cc (ClosureType::as_string): Fix string
representation.
From: Philip Herron
This macro is a mess and a helper method is much better for this case.
gcc/rust/ChangeLog:
* resolve/rust-name-resolver.cc (MKBUILTIN_TYPE): Remove macro.
(Rib::Rib): Remove `mappings` field.
(Resolver::generate_builtins): Use `setup_builtin` instead
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix dumping of fn params.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Raiki Tamura
gcc/rust/ChangeLog:
* backend/rust-builtins.cc (BuiltinsContext::setup_math_fns): New
functions.
gcc/testsuite/ChangeLog:
* rust/compile/torture/intrinsics-math.rs: New test.
---
gcc/rust/backend/rust-builtins.cc | 122 +++-
From: Philip Herron
When we have a closure expression that captures a parent function's
variable we must setup the closure data to contain this. Ignoring
moveability and mutability requires for now, this patch creates the closure
structure with fields for each of the captured variables. When it
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
* ast/rust-ast-dump.h: Likewise.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 129 +++---
gcc/rust/ast/rust-ast-dump.h | 3 +
2
From: Philip Herron
This adds missing copy constructors to HIR::PathExprSegment which were
wrongly defaulting to empty vectors when apply specified generic arguments
to method calls.
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h: Add const `get_method_name`.
*
From: Philip Herron
This allows us to track the type of declaration that is stored within a
Rib.
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add Rib
argument.
(ResolveExpr::resolve_closure_param): Likewise.
*
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing never type visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
This is currently needed for lifetimes to use the existing infrastructure.
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add new reference visitor wrapper.
* ast/rust-ast-dump.h: Declare it.
* ast/rust-item.h: Add mutable visibility
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): Declare
atomic
load intrinsics.
* backend/rust-compile-intrinsic.cc (atomic_load_handler_inner): New
handler.
(atomic_load_handler): Likewise.
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (wrapping_op_handler): Refactor to
return
an `std::function`.
(wrapping_op_handler_inner): Rename.
(wrapping_add_handler): Remove function.
(wrapping_sub_handler): Likewise.
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (is_basic_integer_type): New
function.
(unchecked_op_inner): New handler.
(unchecked_op_handler): New handler.
gcc/testsuite/ChangeLog:
* rust/compile/torture/intrinsics-6.rs: New test.
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (MacroBuiltin::assert): Rename to...
(MacroBuiltin::assert_handler): ..this.
(MacroBuiltin::file): Rename to...
(MacroBuiltin::file_handler): ..this.
(MacroBuiltin::column): Rename
From: YizhePKU
gcc/rust/ChangeLog:
* util/rust-inline-visitor.h: New file.
---
gcc/rust/util/rust-inline-visitor.h | 95 +
1 file changed, 95 insertions(+)
create mode 100644 gcc/rust/util/rust-inline-visitor.h
diff --git
From: Simon Cook
gcc/rust/ChangeLog:
* util/rust-inline-visitor.h: Remove some offending system includes.
---
gcc/rust/util/rust-inline-visitor.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/gcc/rust/util/rust-inline-visitor.h
b/gcc/rust/util/rust-inline-visitor.h
index
From: Philip Herron
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Refactor checking
of closures.
(CompileExpr::generate_possible_fn_trait_call): New function.
* backend/rust-compile-expr.h: Declare
`generate_possible_fn_trait_call`.
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Add handling for `fn_once_output`.
---
gcc/rust/util/rust-lang-item.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait):
Check if a
trait query is currently in progress.
* typecheck/rust-hir-type-check.h (class TraitQueryGuard): Add helpers
around
checking for trait
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing tuple type visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-resolve.cc (TraitResolver::TraitResolver):
Do not nullptr init
`resolved_trait_reference` anymore.
(TraitResolver::resolve_path): Simplify function and rename to...
From: Arthur Cohen
gcc/rust/ChangeLog:
* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Fix extra call
to `delete`.
---
gcc/rust/typecheck/rust-tyty-call.cc | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/rust/typecheck/rust-tyty-call.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::go): Use new API.
(Dump::format_function_param): Refactor.
(Dump::visit_items_joined_by_separator): New function.
(Dump::emit_attrib): Refactor.
(Dump::visit_as_line): New function.
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add code for dumping type aliases.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): New
function.
(BuiltinsContext::setup): Call `setup_atomic_fns`.
* backend/rust-builtins.h: Declare `setup_atomic_fns`.
* backend/rust-compile-intrinsic.cc
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-constexpr.cc (build_anon_member_initialization):
Workaround uninitialized
values.
(build_data_member_initialization): Likewise.
---
gcc/rust/backend/rust-constexpr.cc | 96 +++---
1 file
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (sorry_handler): New intrinsic
handler.
gcc/testsuite/ChangeLog:
* rust/compile/torture/intrinsics-3.rs: New test.
---
gcc/rust/backend/rust-compile-intrinsic.cc | 10 ++
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add dump code for ArrayExpr.
---
gcc/rust/ast/rust-ast-dump.cc | 32
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: Add new object file for expression lowering.
* ast/rust-expr.h: Move implementation of expr lowering to source file.
* backend/rust-compile-block.h: Likewise.
* backend/rust-compile-expr.cc
From: Thomas Schwinge
... lost in #1527 commit 138a6260124740208b8f3aff2e38617f43b05fe8
"rust: Add -frust-compile-until option".
gcc/rust/ChangeLog:
* lang.opt: Fix ordering of file.
---
gcc/rust/lang.opt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
When checking if specified bounds satisfy other bounds we must lookup the
super traits. To finish the support for super traits we need to redo the
computation of method addresses to support super traits.
Addresses #914
gcc/rust/ChangeLog:
* backend/rust-compile.cc:
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.h: Fix documentation.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.h b/gcc/rust/ast/rust-ast-dump.h
index
From: Raiki Tamura
gcc/rust/ChangeLog:
* lex/rust-lex.cc (Lexer::Lexer): Add `dump_lex` boolean flag.
(Lexer::skip_token): Dump tokens if flag is enabled.
(Lexer::dump_and_skip): New function.
* lex/rust-lex.h: Include optional.h and declare functions.
*
From: Philip Herron
gcc/testsuite/ChangeLog:
* rust/debug/chartype.rs: Skip testcases on Darwin architectures.
---
gcc/testsuite/rust/debug/chartype.rs | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/gcc/testsuite/rust/debug/chartype.rs
From: Philip Herron
When we have a closure block referencing variables in a parent function,
we must track what these are. We do this by having a context of closures
so if we have a variable reference and its declared in a rib whose node id
is less than the node id of the closure's node id we
From: Dave
gcc/rust/ChangeLog:
* ast/rust-item.h: Remoe default location for Visibility class.
* parse/rust-parse-impl.h (Parser::parse_visibility): Pass proper
location
when instantiating visibilities.
---
gcc/rust/ast/rust-item.h | 33
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc: Remove unused include.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index
From: Jakub Dupak
+ Return FunctionQualifiers as ref to work in ast dump
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
* ast/rust-ast-dump.h: Add missing getter declaration.
* ast/rust-ast-full-test.cc (BareFunctionType::as_string): Fix
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing RawPointer visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 200 +++---
1 file changed, 112 insertions(+), 88 deletions(-)
diff --git
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
This is currently needed for lifetimes to use the existing infrastructure.
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitors.
* ast/rust-ast-dump.h: Likewise.
* ast/rust-ast.h: Add `get_lifetime_bounds` method.
*
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add handling for unit structures.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing slice visitor.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 5 +
1 file changed, 5 insertions(+)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (check_for_basic_integer_type): New
function.
(build_atomic_builtin_name): Use HIR Type instead of `tree`.
(atomic_store_handler_inner): Cleanup error handling.
(unchecked_op_inner):
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add new visit function for
overloading.
* ast/rust-ast-dump.h: Add documentation for layer.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 7 +++
gcc/rust/ast/rust-ast-dump.h | 8
From: Raiki Tamura
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Add handling for `phantom_data` lang item.
gcc/testsuite/ChangeLog:
* rust/compile/torture/phantom_data.rs: New test.
---
gcc/rust/util/rust-lang-item.h | 9 +
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-tyty-bounds.cc
(TypeCheckBase::get_predicate_from_bound): Add missing
implementation.
---
gcc/rust/typecheck/rust-tyty-bounds.cc | 69 +++---
1 file changed, 62 insertions(+), 7 deletions(-)
diff
From: Dave
gcc/rust/ChangeLog:
* ast/rust-item.h: Add location member.
* hir/rust-ast-lower.cc (translate_visibility): Pass location argument.
* hir/tree/rust-hir-item.h: Fix constructor to accept Location argument.
---
gcc/rust/ast/rust-item.h | 19
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): move generic params dump ...
(Dump::emit_generic_params): ... here.
* ast/rust-ast-dump.h (emit_generic_params): New.
---
gcc/rust/ast/rust-ast-dump.cc | 30 +-
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::format_tuple_field): New.
(Dump::format_struct_field): New.
* ast/rust-ast-dump.h (format_tuple_field): New.
(format_struct_field): New.
---
gcc/rust/ast/rust-ast-dump.cc | 17 +
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Implement visitor for If
expressions.
---
gcc/rust/ast/rust-ast-dump.cc | 22 +++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
When supporting calls to super traits we need to allow lookups based on
the super traits as specified on the TraitReferences.
Fixes #1555
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-ref.h (lookup_trait_item): Add lookup
in super_trait.
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Dump items in modules properly.
---
gcc/rust/ast/rust-ast-dump.cc | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing visitors for macro
definition dumping.
(get_delimiters): New function.
* ast/rust-ast-dump.h: Declare `get_delimiters` and add documentation.
* ast/rust-macro.h: Add
From: Philip Herron
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Visit closure
properly when
name resolving.
(ResolveExpr::resolve_closure_param): Implement closure name resolving.
* resolve/rust-ast-resolve-expr.h: Declare
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.cc (Fragment::Fragment): Add better APIs.
(Fragment::complete): New function.
(Fragment::unexpanded): New function.
* ast/rust-ast-fragment.h: Declare new APIs and add documentation.
*
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix formatting when dumping
modules.
---
gcc/rust/ast/rust-ast-dump.cc | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: Compile rust-ast-lower-type.cc.
* ast/rust-path.h: Add `get_locus` method to `TypePathFunction`.
* hir/rust-ast-lower-base.cc (ASTLowerTypePath::visit): Move
implementation to
rust-ast-lower-type.cc.
From: Philip Herron
gcc/rust/ChangeLog:
* hir/rust-ast-lower-pattern.cc
(ASTLoweringPattern::ASTLoweringPattern):
Improve formatting.
(ASTLoweringPattern::translate): Likewise.
* hir/rust-ast-lower-pattern.h: Likewise.
* resolve/rust-ast-resolve-expr.h:
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs.
---
gcc/rust/ast/rust-ast-dump.cc | 31 +--
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc
From: Philip Herron
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add
missing handling of
function case.
---
gcc/rust/resolve/rust-ast-resolve-type.cc | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix IfExpr formatting.
---
gcc/rust/ast/rust-ast-dump.cc | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index
From: David Faust
Adds dump for:
- BorrowExpr
- DereferenceExpr
- ErrorPropagationExpr
- NegationExpr
- TypeCastExpr
- GroupedExpr
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add dump for, BorrowExpr,
DereferenceExpr,
ErrorPropagationExpr, NegationExpr,
From: Philip Herron
gcc/rust/ChangeLog:
* backend/rust-compile-context.h: Add new functions:
`insert_closure_decl` and
`lookup_closure_decl`.
* backend/rust-compile-expr.cc (CompileExpr::visit): Start compiling
Closures properly.
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix block formatting.
---
gcc/rust/ast/rust-ast-dump.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index
From: Philip Herron
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h: Add `get_params` method.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Typecheck closure nodes.
(TypeCheckExpr::resolve_fn_trait_call): New function.
*
From: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Simplify method
call type checking by removing visitor and instead using one
static cast. Use the
new interface.
* typecheck/rust-tyty-call.cc
From: Philip Herron
gcc/rust/ChangeLog:
* checks/errors/rust-const-checker.cc (ConstChecker::visit): Visit
closures properly.
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
* checks/lints/rust-lint-marklive.h: Likewise.
---
From: Philip Herron
gcc/rust/ChangeLog:
* hir/rust-ast-lower-base.h (class ItemWrapper): New class.
* hir/rust-ast-lower-base.cc
(ASTLoweringBase::handle_outer_attributes): Use
`ItemWrapper` class.
(ASTLoweringBase::handle_doc_item_attribute): Likewise.
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc: Emit visibility when dumping items.
---
gcc/rust/ast/rust-ast-dump.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index fdcd97561bb..b7557bdee0c 100644
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Properly handle unloaded modules.
Signed-off-by: Jakub Dupak
---
gcc/rust/ast/rust-ast-dump.cc | 41 +++
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git
From: Philip Herron
This patch fixes bad method resolution in our operator_overload_9 case.
When we have a reference to something and we deref we must resolve to
the mutable reference impl block. The interface we are using to resolve
methods is the can_eq interface which allows for permissive
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add dumps for ComparisonExpr and
LazyBooleanExpr.
---
gcc/rust/ast/rust-ast-dump.cc | 50 +--
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git
From: Philip Herron
gcc/rust/ChangeLog:
* util/rust-abi.cc (get_abi_from_string): Add missing "rust-call"
possibility for ABI variant.
---
gcc/rust/util/rust-abi.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/rust/util/rust-abi.cc b/gcc/rust/util/rust-abi.cc
index
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Add note for
glob import resolving.
---
gcc/rust/resolve/rust-ast-resolve-item.cc | 8
1 file changed, 8 insertions(+)
diff --git
From: Philip Herron
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Add `fn_once` lang item.
---
gcc/rust/util/rust-lang-item.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 4d9dc8a3d3a..c7e0e5c811d
From: Arthur Cohen
gcc/rust/ChangeLog:
* backend/rust-builtins.cc (BuiltinsContext::setup): Declare prefetch
intrinsics.
* backend/rust-compile-intrinsic.cc (enum class Prefetch): Add kinds of
prefetch intrinsics.
(prefetch_data_handler): New function.
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-path.h: Add `accept_vis` method to `GenericArg` class.
---
gcc/rust/ast/rust-path.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fill empty functions for
structs, enums and unions.
---
gcc/rust/ast/rust-ast-dump.cc | 135 --
1 file changed, 127 insertions(+), 8 deletions(-)
diff --git
From: David Faust
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Dump assignment and compound
assignment expressions.
---
gcc/rust/ast/rust-ast-dump.cc | 56 +--
1 file changed, 54 insertions(+), 2 deletions(-)
diff --git
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::emit_visibility): New function.
(Dump::visit): Call into `emit_visibility`.
(Dump::format_function_common): Likewise.
* ast/rust-ast-dump.h: Declare `emit_visibility`.
---
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-item.h: Rename get_public_vis_type.
* hir/rust-ast-lower.cc (translate_visibility): Use new name.
---
gcc/rust/ast/rust-item.h | 2 +-
gcc/rust/hir/rust-ast-lower.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Hi everyone,
This series contain the majority of gccrs commits which were present on
our GitHub repository but did not have a Changelog entry yet. We have
cleaned, rebased, tested and fixed all of these to contain proper
Changelog entries as well as DCO signoff for big contributions.
All of
From: Philip Herron
When we lookup names in paths such as Foo::bar, foo is a type we resolve
and then we lookup 'bar' based on what type Foo is which includes probing
relevant bounds of this type. We currently return a vector of possible
candidates and this patch changes it so that we return a
From: Philip Herron
When resolving local enum's within a Block the name resolution info is
not at the top of the stack so this patch introduces a new mappings class
for miscellaneous name resolutions which can be used during path analaysis.
Fixes #1272
gcc/rust/ChangeLog:
*
From: Philip Herron
We must track the DefID on variants for algebraic data types as this will
allow us to enforce unique'ness on path queries relating to this.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-enumitem.cc
(TypeCheckEnumItem::visit): Adjust VariantDef ctor
From: Arthur Cohen
gcc/rust/ChangeLog:
* Make-lang.in: Add `rust-builtins.o` as target
* backend/rust-builtins.h: Refactor to new file.
* backend/rust-builtins.cc: New file.
---
gcc/rust/Make-lang.in | 1 +
gcc/rust/backend/rust-builtins.cc | 143
From: Philip Herron
When we have a type query where by generic substitution occurs we can hit
the case where we need to Probe the bounds of the substited item to
determine whether the the bounds are compatible this can cause us to
end up querying the same type recursively.
Fixes #1550
From: Faisal Abbas
Signed-off-by: Faisal Abbas <90.abbasfai...@gmail.com>
gcc/testsuite/ChangeLog:
* rust/compile/const9.rs: New test.
Signed-off-by: Faisal Abbas
---
gcc/testsuite/rust/compile/const9.rs | 18 ++
1 file changed, 18 insertions(+)
create mode 100644
1 - 100 of 101 matches
Mail list logo