From: 0xn4utilus
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add Kind Enum to
Pattern.
* ast/rust-macro.h: Add get_pattern_kind().
* ast/rust-path.h: Likewise.
* ast/rust-pattern.h: Likewise.
Signed-off-by: 0xn4utilus
---
gcc/rust/ast/rust-ast.h | 20
From: 0xn4utilus
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit):
Check if function is_external or not.
* hir/rust-ast-lower-extern.h: Use AST::Function
instead of AST::ExternalFunctionItem.
* parse/rust-parse-impl.h (Parser::
From: 0xn4utilus
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Remove dead code.
* ast/rust-ast-collector.h: Likewise.
* ast/rust-ast-full-decls.h (class ExternalFunctionItem):
Likewise.
* ast/rust-ast-visitor.cc (Default
This fixes an issue we had where the generated code ended with more static
pieces than its rustc counterpart.
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (struct FormatArgsInput): Store the
format_str
as a string instead of an AST::Expr.
(format_args_parse_argumen
gcc/rust/ChangeLog:
* util/rust-lang-item.h (class RustLangItem): Renamed to...
(class LangItem): ...this. Rename ItemType enum to Kind
* util/rust-lang-item.cc: Rename methods to use new class name.
* backend/rust-compile-expr.cc (CompileExpr::visit): Use new lang-
From: 0xn4utilus
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit):
Add external function validation support. Add ErrorCode::E0130.
* parse/rust-parse-impl.h (Parser::parse_function): Parse
external functions from `parse_function`.
gcc/rust/ChangeLog:
* ast/rust-macro.h: Use proper node id instead of the one in the base
Expr class - which is uninitialized.
---
gcc/rust/ast/rust-macro.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
in
gcc/rust/ChangeLog:
* Make-lang.in: Add new object.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Remove calls to
FormatArgsLowering.
* expand/rust-expand-format-args.cc: New file.
* expand/rust-expand-format-args.h: New file.
---
gcc/rust/Make-lan
From: jjasmine
Fix issue 2897
gcc/rust/ChangeLog:
* hir/rust-ast-lower-extern.h: Add translate_visiblity
* hir/tree/rust-hir-item.h: Fix constructor of ExternalTypeItem
---
gcc/rust/hir/rust-ast-lower-extern.h | 4 +++-
gcc/rust/hir/tree/rust-hir-item.h| 4 ++--
2 files cha
From: Thomas Schwinge
Reformat the upstream GCC commit f4a2ae2338962208b8039f154f5912402e94c378
"Change MODE_BITSIZE to MODE_PRECISION for MODE_VECTOR_BOOL" change to
'gcc/rust/backend/rust-tree.cc' to clang-format's liking.
gcc/rust/
* backend/rust-tree.cc (c_common_type_for_mod
gcc/rust/ChangeLog:
* ast/rust-ast-builder.h: Rename AST::AstBuilder -> AST::Builder
* ast/rust-ast-builder.cc: Likewise.
* expand/rust-derive.cc: Use new AST::Builder name.
* expand/rust-derive.h: Likewise.
* ast/rust-builtin-ast-nodes.h: Add required gette
gcc/rust/ChangeLog:
* ast/rust-ast.cc: Make FormatArgs inherit from AST::Expr
* ast/rust-builtin-ast-nodes.h: Improve FormatArg* nodes and helpers.
* ast/rust-fmt.cc (Pieces::collect): Fix interface to match FFI
function.
* ast/rust-fmt.h (collect_pieces): Likewise
gcc/testsuite/ChangeLog:
* rust/compile/format_args_basic_expansion.rs: New test.
---
.../compile/format_args_basic_expansion.rs| 47 +++
1 file changed, 47 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/format_args_basic_expansion.rs
diff --git a/gcc/te
From: Thomas Schwinge
Reformat the upstream GCC commit 61644aea34c4623d16273ff705f8b8b1ff2d87f0
"gccrs: tokenize Unicode identifiers" change to 'gcc/rust/lex/rust-lex.cc'
to clang-format's liking.
gcc/rust/
* lex/rust-lex.cc (is_identifier_start): Placate clang-format.
---
gcc/r
From: Pierre-Emmanuel Patry
Reference to unique pointers are a known anti pattern, only the element
shall be taken by reference instead of the whole wrapper.
gcc/rust/ChangeLog:
* ast/rust-item.h: Change getter function prototype to return a
reference directly instead of a refer
From: jjasmine
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add error
emitting
---
gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
b/g
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
Collect variance info from types.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-hir-type-check-item.cc | 17 +
1 file changed, 13 insertions(+), 4 del
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Create an immutable
view of the name resolution context.
---
gcc/rust/rust-session-manager.cc | 4
1 file changed, 4 insertions(+)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-ma
gcc/rust/ChangeLog:
* Make-lang.in: Compile it.
* resolve/rust-immutable-name-resolution-context.cc: New file.
* resolve/rust-immutable-name-resolution-context.h: New file.
---
gcc/rust/Make-lang.in | 1 +
.../rust-immutable-name-resolution-context
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-tyty-subst.cc (SubstitutionRef::get_arg_at):
Add unified API.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-tyty-subst.cc | 11 +++
1 file changed, 11 insertions(+)
diff --git a/gcc/rust/typecheck/rust-ty
From: Guillaume Gomez
gcc/rust/ChangeLog:
* expand/rust-derive.cc (DeriveVisitor::derive): Fix typo
---
gcc/rust/expand/rust-derive.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/expand/rust-derive.cc b/gcc/rust/expand/rust-derive.cc
index 4177004eccf..e
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.cc
(NameResolutionContext::lookup):
Add lookup function.
* resolve/rust-name-resolution-context.h: Include mappings and optional.
---
gcc/rust/resolve/rust-name-resolution-context.cc | 13 +
gcc/rust/r
From: 0xn4utilus
gcc/rust/ChangeLog:
* ast/rust-ast.cc (Function::Function): Add `is_external_function`
field.
(Function::operator=): Likewise.
* ast/rust-ast.h: New constructor for ExternalItem.
* ast/rust-item.h (class Function): Add `is_external_function`
From: Pierre-Emmanuel Patry
Function return type was not properly visited in the default resolver
visitor pattern.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit
function return type.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/re
Fetch the ImmutableNrCtx in order to access name resolver during
typechecking.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Start
fetching name resolution information in the typechecker.
* typecheck/rust-hir-type-check-type.cc
(TypeC
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Create name
resolution
context for Session::expansion and subsequent name resolution passes.
(Session::expansion): Take name resolution context as a parameter
instead.
* rust-session-ma
From: Pierre-Emmanuel Patry
The compiler did not emit any warning when a same target was declared
from different sources.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec):
Use the new dict to track down already resolved use declarations
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (ffi::RustHamster::to_string): New.
(Pieces::collect): Adapt to use new handle API.
(Pieces::~Pieces): Likewise.
(Pieces::Pieces): Likewise.
(Pieces::operator=): Likewise.
* ast/rust-fmt.h (struct RustString): Ad
From: Pierre-Emmanuel Patry
Only tuple struct constructor was added to the resolver.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit):
Add tuple struct type to the resolver's context.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/r
gcc/rust/ChangeLog:
* rust-session-manager.cc: Add files for dumping name resolution, call
name resolution dump function.
(Session::dump_name_resolution): New.
* rust-session-manager.h: New declaration.
---
gcc/rust/rust-session-manager.cc | 30
From: Pierre-Emmanuel Patry
The error message did not match rustc's.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Change
error message.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 3 +--
From: Pierre-Emmanuel Patry
The resolver did report duplicate symbols when being run multiple times
even if the node id was the same. This commit adds an additional
condition, the error will only be reported if the existing node id is
different from the current node id.
gcc/rust/ChangeLog:
From: Pierre-Emmanuel Patry
Constant items were handled only by the old resolver, this lead to an
ICE when using the new resolver on some rust code containing a constant
item as the new and the old resolver cannot be used at the same time.
gcc/rust/ChangeLog:
* backend/rust-compile-item
From: Jakub Dupak
gcc/rust/ChangeLog:
* Make-lang.in: Add new .cc file.
* rust-session-manager.cc (Session::compile_crate): Run
analysis.
* typecheck/rust-tyty-variance-analysis-private.h: New file.
* typecheck/rust-tyty-variance-analysis.cc: New file.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::setup_builtin_types):
Setup bool as builtin type.
---
gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
b/gcc/rust
From: Pierre-Emmanuel Patry
This overload did not dispatch the visitor to sub members of a raw
pointer like the default one. It is therefore useless as pointed type
shall be visited to be resolved correctly.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit)
From: jjasmine
Fixes issue #2855
gcc/rust/ChangeLog:
* Make-lang.in: add new .o builds for new .cc files
* expand/rust-cfg-strip.h (RUST_CFG_STRIP_H): Add include guards
for rust-cfg-strip
* expand/rust-macro-builtins.cc (make_macro_path_str): moved to new
respe
From: Pierre-Emmanuel Patry
Immutable name resolution context is not initialized when the classic
name resolution is in use. It can therefore not be used, the getter would
error out.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc
(TypeCheckExpr::resolve_root_path):
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Use new ImmutableNrCtx.
* backend/rust-compile-context.h: Likewise.
* backend/rust-compile-expr.cc: Likewise.
* backend/rust-compile-item.cc: Likewise.
---
gcc/rust/backend/rust-compile-base.cc | 1 +
gcc/rust/
From: Pierre-Emmanuel Patry
The enum type shall be in type namespace, not value namespace.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit):
Change enum type namespace.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resolve/rust-top
From: Pierre-Emmanuel Patry
Direct function calls did not work anymore due to the transition to the
new resolver.
gcc/rust/ChangeLog:
* checks/lints/rust-lint-marklive.cc (MarkLive::find_ref_node_id):
Add code path for the resolver 2.0
* resolve/rust-late-name-resolver-2
From: Pierre-Emmanuel Patry
Name resolution for rebind were missing.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::handle_use_glob):
Change function prototype to use a reference instead.
(TopLevel::handle_use_dec): Likewise.
(TopLev
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx: Start using Rib::Definition for
shadowable information.
* resolve/rust-late-name-resolver-2.0.cc (next_node_id): New.
(next_hir_id): New.
(Late::setup_builtin_types): Improve builtin type setup.
*
From: Pierre-Emmanuel Patry
Elements from glob use declaration shall be shadowable by default.
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Add a new function prototype to insert
a shadowable definition.
* resolve/rust-forever-stack.hxx: Add the new insert_shadowa
From: Pierre-Emmanuel Patry
We shall search in the right namespace. The correct namespace for struct
is type namespace.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Change
search location for struct types.
Signed-off-by: Pierre-Emmanuel Pa
From: Pierre-Emmanuel Patry
Glob use declarations may lead to ambiguous situation where two
definitions with the same name are imported in a given scope. The
compiler now handles shadowable items inserted after non shadowable
items. An error is now thrown when multiple shadowable items are import
gcc/rust/ChangeLog:
* backend/rust-compile-resolve-path.cc: Attempt to resolve names
also using new name resolution context.
* backend/rust-compile-resolve-path.h: Add new declaration.
---
gcc/rust/backend/rust-compile-resolve-path.cc | 112 +++---
gcc/rust/bac
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.cc
(NameResolutionContext::map_usage):
Use newtype pattern.
(NameResolutionContext::lookup): Likewise.
* resolve/rust-name-resolution-context.h (class Usage): New class.
(class Definition): Likewise
From: Pierre-Emmanuel Patry
Values were inserted in the label namespace instead of the value
namespace this lead to several bugs.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change the
namespace for values from "label" to "values".
Signed-off-by:
From: Pierre-Emmanuel Patry
This format dialog triggered a warning.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec):
Replace the string format %<%s%> with the proper %qs format.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/reso
From: Pierre-Emmanuel Patry
Error message did not match the test from the previous name resolver when
a given path cannot be resolved.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc
(TypeCheckExpr::resolve_root_path):
Change error message to match old resolver and
From: Pierre-Emmanuel Patry
GCC 4.8 does not handle pair with references correctly. We need to use a
properly typed struct instead.
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Change dfs function prototype and
declare dfs return type structure.
* resolve/rust-for
From: Pierre-Emmanuel Patry
The resolver was emitting an error when meeting the same symbol twice.
What is important here is the origin of the resolved symbol, we should
emit an error when the name is similar but the symbol isn't be not when
the resolver is simply meeting the exact same symbol.
From: Owen Avery
gcc/rust/ChangeLog:
* util/rust-attribute-values.h
(Attributes::RUSTC_DEPRECATED): New.
* util/rust-attributes.cc
(__definitions): Add Attributes::RUSTC_DEPRECATED.
gcc/testsuite/ChangeLog:
* rust/compile/deprecated-fn.rs: New test.
Sig
From: Pierre-Emmanuel Patry
Definition/usage mapping during name resolution was missing.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add mapping
implementation.
* resolve/rust-late-name-resolver-2.0.h: Add function visitor prototype
From: Pierre-Emmanuel Patry
The type of constant item expression was not properly visited in the
default resolver.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit
constant item's types.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/r
From: Jakub Dupak
Replace direct usage of system headers.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-dump.cc: Use rust-system.h
* checks/errors/borrowck/rust-bir-dump.h (RUST_BIR_DUMP_H): Use
rust-system.h
* checks/errors/borrowck/rust-bir-place.h (RUST_BIR_P
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Module
should be added to the type namespace in order to be retrieved later.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.
From: Owen Avery
gcc/rust/ChangeLog:
* lex/rust-lex.cc
(Lexer::parse_raw_string):
Bring handling of edge cases to par with parse_raw_byte_string.
gcc/testsuite/ChangeLog:
* rust/compile/raw-string-loc.rs: New test.
Signed-off-by: Owen Avery
---
gcc/rust/lex/r
From: Pierre-Emmanuel Patry
Remove extern block scoping visit function, use the default visitor visit
function instead. We do not need scoping for extern block as their
element shall be visible from the extern block scope.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultR
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit):
Use callable API
Signed-off-by: Jakub Dupak
---
.../borrowck/rust-bir-builder-expr-stmt.cc| 23 ---
1 file changed, 5 insertions(+), 18 d
From: Owen Avery
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h
(Parser::parse_vis_item):
Call parse_function instead of parse_async_item when finding
UNSAFE or EXTERN_KW during lookahead.
gcc/testsuite/ChangeLog:
* rust/compile/func-const-unsafe.rs: New
From: Pierre-Emmanuel Patry
This is the first part of the code required to enable globbing on use
declarations.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit):
Insert names into their namespace.
(TopLevel::visit): Insert ast mod
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-place.h:
Create place tree traverse API.
Signed-off-by: Jakub Dupak
---
.../checks/errors/borrowck/rust-bir-place.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/gcc/rust/check
From: Pierre-Emmanuel Patry
Crate number was not assigned with the other fields in the assignment
operator overload of a CannonicalPath.
gcc/rust/ChangeLog:
* util/rust-canonical-path.h: Also assign crate number.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/util/rust-canonical-p
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-dump.cc (Dump::visit): const
visitor
* checks/errors/borrowck/rust-bir-dump.h: const visitor
* checks/errors/borrowck/rust-bir-visitor.h: const visitor
* checks/errors/borrowck/rust-bi
From: Pierre-Emmanuel Patry
Globbing visitor did not visit subitems.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add a check
for missing item.
* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::go):
Add a new function i
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-place.h (struct Lifetime):
Extended regions and loans.
(struct Loan): Representation of loan (result of borrowing)
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::vis
From: Pierre-Emmanuel Patry
The old resolver injected a Self generic parameter in order to help the
trait solver. This is clearly sketchy at best and should be fixed in
the future.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
Self gener
From: Pierre-Emmanuel Patry
A tuple struct constructor should be inserted in the value namespace
during name resolution in order to reject multiple definitions of the
function.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
the struct con
gcc/testsuite/ChangeLog:
* rust/compile/name_resolution13.rs: Add new module and remove compile
step.
* rust/compile/name_resolution14.rs: New test.
* rust/compile/name_resolution15.rs: New test.
* rust/compile/name_resolution16.rs: New test.
* rust/
From: Pierre-Emmanuel Patry
A previous bug with name resolution 2.0 was caused by an incorrectly
resolved inherent impl name. This test shall highlight the behavior
and prevent regression.
gcc/testsuite/ChangeLog:
* rust/compile/name_resolution25.rs: New test.
Signed-off-by: Pierre-Emm
From: Pierre-Emmanuel Patry
Unit struct have a special constructor that should be added to the struct
namespace in order to be resolved later when called. As it is a function
it should be added in the value namespace.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (Glo
From: Owen Avery
gcc/rust/ChangeLog:
* lex/rust-lex.cc
(Lexer::parse_raw_byte_string):
Bring handling of edge cases to par with parse_byte_string.
gcc/testsuite/ChangeLog:
* rust/compile/raw-byte-string-loc.rs: New test.
Signed-off-by: Owen Avery
---
gcc/rust
From: Pierre-Emmanuel Patry
Inherent impl has a type it applies to. This type
was not visited and thus not resolved.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit
inherent impl type.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/re
From: Pierre-Emmanuel Patry
Constants could not be resolved without their identifier in the right
scope.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
constant identifiers to the resolver.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/
The error is actually expected and uses the correct location.
gcc/testsuite/ChangeLog:
* rust/compile/raw-byte-string-loc.rs: Use dg-error instead of
dg-excess-error.
* rust/compile/raw-string-loc.rs: Likewise.
---
gcc/testsuite/rust/compile/raw-byte-string-loc.rs | 2 +-
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Bump copyright.
* checks/errors/borrowck/ffi-polonius/src/lib.rs: Bump copyright.
* checks/errors/borrowck/polonius/rust-polonius-ffi.h: Bump copyright.
* checks/errors/b
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/bir-design-notes.md (nodes): Rename node to
statement.
(Nodes): Rename node to statement.
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit):
Rename node to statement.
From: Pierre-Emmanuel Patry
We need to visit subcomponents in unsafe elements, this means we can
leverage the default ast visitor's code instead of duplicating it.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove
empty visit function.
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::setup_loop):
Loop handling.
(ExprStmtBuilder::visit): Handle scopes.
* checks/errors/borrowck/rust-bir-builder-internal.h (struct
BuilderContext):
From: Pierre-Emmanuel Patry
Add a few test for globbing to highlight function call ambiguities.
gcc/testsuite/ChangeLog:
* rust/compile/name_resolution23.rs: New test.
* rust/compile/name_resolution24.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
.../rust/compile/nam
From: Owen Avery
gcc/rust/ChangeLog:
* util/rust-attribute-values.h
(Attributes::UNSTABLE): New.
* util/rust-attributes.cc
(__definitions): Add Attributes::UNSTABLE.
gcc/testsuite/ChangeLog:
* rust/compile/unstable-fn.rs: New test.
Signed-off-by: Owen A
From: Jakub Dupak
This is the main Polonius based logic which creates the information
Polonius needs from BIR. It is largly guessed and rever engineered, so
some aspects are probably wrong.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-fact-collector.h: New file.
* check
Never can... never... exist, so it should always be coerced to the type
it is being matched against. This is useful for breaking off of a loop
from inside a match, or an if condition, for example.
gcc/rust/ChangeLog:
* typecheck/rust-unify.cc (UnifyRules::go): Always unify to `ltype` if
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit): Emit moves.
* checks/errors/borrowck/rust-bir-builder-internal.h: Emit moves.
* checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Emit moves.
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-free-region.h: New file.
Signed-off-by: Jakub Dupak
---
.../errors/borrowck/rust-bir-free-region.h| 107 ++
1 file changed, 107 insertions(+)
create mode 100644 gcc/rust/checks/errors/borrowck
From: Jakub Dupak
Biggybag on variance analysis to extract regions of fields from ADT
regions.
gcc/rust/ChangeLog:
* typecheck/rust-tyty-variance-analysis-private.h (class
FieldVisitorCtx):
Region extraction.
* typecheck/rust-tyty-variance-analysis.cc (query_field_regio
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-dump.cc (renumber_places):
Remove unecessary braces.
(Dump::go): Remove unecessary braces.
(Dump::visit): Remove unecessary braces.
(Dump::visit_scope): Remove unecessary braces.
Hi Thomas,
On 4/15/24 14:44, Thomas Schwinge wrote:
Hi!
On 2024-04-15T13:14:42+0200, I wrote:
On 2024-04-08T18:33:38+0200, pierre-emmanuel.pa...@embecosm.com wrote:
The rust frontend requires cargo to build some of it's components,
In GCC upstream still: 's%requires%is going to require'. ;
Morning Thomas,
On 4/15/24 13:07, Thomas Schwinge wrote:
Hi!
On 2024-01-16T17:43:10+, Arthur Cohen via Gcc-cvs
wrote:
https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
Author: Pierre-Emmanuel Patry
Date: Wed Apr
Hi Rainer!
On 4/17/24 10:13, Rainer Orth wrote:
Andrew Pinski writes:
On Mon, Apr 8, 2024 at 9:39 AM wrote:
From: Pierre-Emmanuel Patry
Hello,
The rust frontend requires cargo to build some of it's components,
it's presence was not checked during configuration.
WHY did this go in righ
Hi everyone,
This patch checks for the presence of dlopen and pthread_create in libc. If
that is not the
case, we check for the existence of -ldl and -lpthread, as these libraries are
required to
link the Rust runtime to our Rust frontend.
If these libs are not present on the system, then we di
Hey Guillaume :)
On 4/20/24 01:05, Guillaume Gomez wrote:
Hi,
I just encountered the need to retrieve the name of an `rvalue` (if
there is one) while working on the Rust GCC backend.
This patch adds a getter to retrieve the information.
Cordially.
virtual bool get_wide_int (wide_int *)
Thanks Christophe!
I've added your patch as part of a documentation pull-request I'm adding
to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966
It'll be upstreamed with the next batch of commits we send, as soon as
trunk reopens fully for 15.1.
Best,
Arthur
On 4/4/24 18:27, Chris
On 4/29/24 15:30, Christophe Lyon wrote:
On Mon, 29 Apr 2024 at 15:24, Arthur Cohen wrote:
Thanks Christophe!
I've added your patch as part of a documentation pull-request I'm adding
to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966
It'll be upstreamed with th
t front-end v3 42/46] gccrs: Add lang-spec.h
[PATCH Rust front-end v3 43/46] gccrs: Add lang.opt
[PATCH Rust front-end v3 44/46] gccrs: Add compiler driver
[PATCH Rust front-end v3 45/46] gccrs: Compiler proper interface
[PATCH Rust front-end v3 46/46] gccrs: Add README, CONTRIBUTING and
--
Arth
On 11/9/22 14:53, Richard Biener wrote:
On Wed, Oct 26, 2022 at 10:37 AM wrote:
From: Philip Herron
This patch contains the entry point and utilities used for the lowering
of HIR nodes to `tree`s. It also contains a constant evaluator, ported
over from the C++ frontend.
Co-authored-by: Da
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Allow the dump of
prettified AST
(Session::dump_ast_pretty): New
* rust-session-manager.h: Add new output file for pretty AST dump
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/rust/ru
gcc/rust/ChangeLog:
* backend/rust-builtins.h: Refactor builtin context class and add
overflow builtins.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/rust/backend/rust-builtins.h | 51 ++--
1 file changed, 36 insertions(+), 15 deletions
401 - 500 of 1384 matches
Mail list logo