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
Hi everyone,
This patchset is the first of four similarly-sized patchsets aimed at
updating upstream with our most recent changes to the Rust frontend.
We plan on upstreaming small patchsets every week up to the release
of 15.1.
This first set's main change is the addition of the polonius
borrow
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: 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-*
/g
From: Kushal Pal
gcc/rust/ChangeLog:
* ast/rust-expr.h (class OperatorExpr):
Location should be private.
* hir/tree/rust-hir-expr.h (class OperatorExpr): Likewise.
Signed-off-by: Kushal Pal
---
gcc/rust/ast/rust-expr.h | 2 +-
gcc/rust/hir/tree/rust-hir-expr.h
From: Pierre-Emmanuel Patry
Add a new test to prevent regressions on the box syntax as well as its
feature gate.
gcc/testsuite/ChangeLog:
* rust/compile/box_syntax.rs: New test.
* rust/compile/box_syntax_feature_gate.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional in order to
differentiate between a null pointer and a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_pattern): Change call site
in order to accomodate new return type
From: Pierre-Emmanuel Patry
Struct fields can have outer attributes on their field for various
purpose, this behavior should be reflected upon struct expr fields.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Output field
attributes.
* ast/rust
From: Pierre-Emmanuel Patry
Add support for old box expression syntax.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Add visit member
function for BoxExpr nodes.
* ast/rust-ast-collector.h: Add visit function prototype.
* ast/rust-ast-v
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-fmt.h: Remove useless cstddef header from rust-fmt
---
gcc/rust/ast/rust-fmt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/rust/ast/rust-fmt.h b/gcc/rust/ast/rust-fmt.h
index fe933eabdd3..31100ea8f84 100644
--- a/gcc/rust/ast/rus
From: jjasmine
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): make
gccrs recognize negative_impls
* checks/errors/rust-feature-gate.h: likewise.
* checks/errors/rust-feature.cc (Feature::create): likewise.
* checks/errors/ru
From: Pierre-Emmanuel Patry
We do not handle those kind of references yet, we shall not let them
pass as a regular reference.
gcc/rust/ChangeLog:
* ast/rust-expr.h: Add a getter for mutability.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Panic when a
raw refer
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit):
New for AST::CallExpr and AST::MethodCallExpr.
* resolve/rust-default-resolver.h
(DefaultResolver::visit): Likewise.
Signed-off-by: Owen Avery
---
gcc/rust
From: Pierre-Emmanuel Patry
Wrap the return type within an optional.
gcc/rust/ChangeLog:
* checks/errors/privacy/rust-privacy-reporter.cc: Change call site
to accomodate new return type.
* checks/errors/privacy/rust-pub-restricted-visitor.cc: Likewise.
* util/rus
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional and remove the out
reference argument.
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Adapt
the function call to match its new prototype.
* resolve/rust-early
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional.
gcc/rust/ChangeLog:
* metadata/rust-export-metadata.cc (ExportContext::emit_trait):
Adapt call site to the new return type.
(ExportContext::emit_function): Likewise.
(ExportContext::e
From: Owen Avery
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc
(MacroBuiltin::builtin_transcribers):
Add entries for "rustc_const_stable" and "rustc_const_unstable".
* util/rust-attributes.cc
(__definitions): Add entries for RUSTC_CONST_STABLE and
From: Pierre-Emmanuel Patry
The box syntax is experimental even though it is used in the standard
library. It should be feature gated to prevent anyone from using it in
stable rust.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Allow
visitor recu
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit):
Scope with Rib::Kind::ConstantItem instead
of Rib::Kind::Item.
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Remove redundancy in ov
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: 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: Pierre-Emmanuel Patry
Generic parameter parsing failed when an outer attribute was used on it.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_generic_param): Change token
reference to be the last token after all outer attributes have been
parsed.
Sig
From: Pierre-Emmanuel Patry
First test checks the may_dangle outer atttribute on generic params can
be parsed. The second one tests whether may_dangle attributes are
correctly feature gated.
gcc/testsuite/ChangeLog:
* rust/compile/dropck_eyepatch_feature_gate.rs: New test.
* rus
From: Pierre-Emmanuel Patry
This syntax is experimental and shall be explicitely enabled in the crate
attributes as it cannot be used in stable rust.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Gate the
excluded pattern.
* checks/errors
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
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: Pierre-Emmanuel Patry
Exclusive range pattern were not handled by the parser as this an
experimental feature.
gcc/rust/ChangeLog:
* ast/rust-pattern.cc (tokenid_to_rangekind): Add a new function to
get a range kind from the current token type.
(RangePattern::as_str
Just a simple cleanupof the code to use error_operand_p
instead of directly comparing against error_mark_node.
This also moves some cdoe around when dealing with error_operand_p
just to be faster and/or slightly tighten up the code slightly.
gcc/rust/ChangeLog:
* rust-gcc.cc (Bvariable::
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.h (enum class): Add InvocKind and AsmKind enums.
* ast/rust-macro.h: Switch semicolon boolean to InvocKind enum.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
* expand/rust-macro-bu
There are some places inside rust-gcc.cc which are candidates
to use range for instead of iterators directly. This changes
the locations I saw and makes the code slightly more readable.
gcc/rust/ChangeLog:
PR rust/119341
* rust-gcc.cc (function_type): Use range fors.
(func
This moves is_floating_point over to using REAL_TYPE_P instead
of manually checking. Note before it would return true for all
COMPLEX_TYPE but complex types' inner type could be integral.
Also fixes up the comment to be in more of the GNU style.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/r
Inside a BLOCK node, all of the variables of the scope/block
are chained together and that connects them to the block.
This just adds a comment to that effect as reading the code
it is not so obvious why they need to be chained together.
gcc/rust/ChangeLog:
PR rust/119342
* rust-g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
Bug ID: 119341
Summary: statement_list in rust-gcc.cc can use range for
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: internal-improvement
Severity: normal
From: ansh
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Handle case for RAW_STRING_LITERAL.
* ast/rust-ast.cc (AttributeParser::parse_meta_item_inner):
Likewise.
(AttributeParser::parse_literal): Likewise.
* ast/rust-ast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
Andrew Pinski changed:
What|Removed |Added
URL||https://gcc.gnu.org/piperma
From: Pierre-Emmanuel Patry
Wrap the return type with an optional and make the return type a pair
with the parent hid.
gcc/rust/ChangeLog:
* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
Adapt code around new return type.
* checks/errors/rust-cons
From: Pierre-Emmanuel Patry
Change the return type to an optional.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address):
Change calling code to accomodate new return type.
* checks/errors/privacy/rust-privacy-reporter.cc:
Li
From: Pierre-Emmanuel Patry
Change the function's return type to an optional.
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-toplevel.h: Adapt the code to the new
return type.
* rust-session-manager.cc (Session::load_extern_crate): Likewise.
* util/rust-hir-map.c
From: Pierre-Emmanuel Patry
Change the function's return type to wrap it within an optional.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Change call site to accomodate new
return type.
* backend/rust-compile-base.h: Change parameter to use a reference.
*
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_generic_param): Change
call site to accomodate the new return type.
(Mappings::lookup_hir_generic_param): Wrap the function's re
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional to differentiate
between a null pointer and a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_struct_field): Change
call site to accomodate new return type.
(Ma
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional in order to
differentiate missing values from null pointers.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_stmt): Change call site
to accomodate new return type.
(Mappings::
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional in order to
differentiate missing values from null pointers.
gcc/rust/ChangeLog:
* backend/rust-mangle-v0.cc (v0_path): Adapt call site to new returned
type.
* util/rust-hir-map.cc (Mappings::lo
From: Pierre-Emmanuel Patry
Change the return type to an optiona. This allows to differentiate
between missing hir impl block and null pointers.
gcc/rust/ChangeLog:
* typecheck/rust-type-util.cc (query_type): Change call to the function
in order to accomodate the new return type
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional.
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc (Early::insert_once): Change
call site to accomodate the new return type.
(Early::visit): Likewise.
* resolve/rust-early-
From: Arthur Cohen
This commit adds Liu Hao's patch from
https://github.com/lhmouse/MINGW-packages/blob/5859d27b2b6101204a08ad9702cb2937f8797be9/mingw-w64-gcc/0100-rust-fix.patch
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-borrow-checker.cc (mkdir_wrapped): Remove.
(Borrow
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/rust/ChangeLog:
* ast/rust-expr.h:
Add support for AST to HIR inline asm translation
* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
* hir/rust-ast-lower-base.h: Likewise.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::v
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: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Successful parse of in and inout, albeit with str
(check_identifier): Likewise.
(parse_asm_arg): Likewise.
* expand/rust-macro-builtins-asm.h (parse_format_string):
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (check_and_set):
Scaffold expected on parse_options and asm_arg
(parse_options): Likewise
(parse_asm_arg): Likewise
* expand/rust-macro-builtins-asm.h (check_and_set): Likewise
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Add potentially_nonpromoted_keywords set str
(check_identifier): likewise
* expand/rust-macro-builtins-asm.h (parse_format_string):
likewise
gcc/testsuite/ChangeLo
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:
* 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
Rename InlineAsmOptions to InlineAsmOption for clarity
gcc/rust/ChangeLog:
* ast/rust-ast-full-decls.h (enum class):
Rename InlineAsmOptions to InlineAsmOption for clarity
* ast/rust-expr.h (enum class): Likewise.
* expand/rust-macro-builtins-asm.c
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parseDirSpec):
Partial second layer of expected in parsing asm
(parse_clobber_abi): Likewise
(parse_operand): Likewise
(parse_reg_operand): Likewise
(parse_asm_arg): Likewise
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 (parse_reg_operand):
Fix compile warnings.
(parse_options): Likewise.
(parse_asm): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_illegal_options.rs:
---
gcc/rust/expan
From: Kushal Pal
gcc/rust/ChangeLog:
* Make-lang.in: Compile new file, rust-polonius.cc
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Opaque
type to represent FFIVector from C++.
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi_generated.rs:
C
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-fmt.h (enum ParseMode):
Drop typedef in Cpp
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs:
Remove repr(C)
* libformat_parser/src/bin.rs: Use ffi
* libformat_parser/src/lib
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: 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/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:
* 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:
* hir/tree/rust-hir-expr.h:
Added ExprType::InlineAsm
* hir/tree/rust-hir.h:
Added ExprType::InlineAsm
---
gcc/rust/hir/tree/rust-hir-expr.h | 3 +--
gcc/rust/hir/tree/rust-hir.h | 1 +
2 files changed, 2 insertions(+), 2 d
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_outside_unsafe.rs: New test.
---
.../rust/compile/inline_asm_outside_unsafe.rs | 11 +++
1 file changed, 11 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_outside_unsafe.rs
diff -
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_asm):
Scaffolding validation of asm!
(validate): Likewise
* expand/rust-macro-builtins-asm.h (validate): Likewise
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 31 +--
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Update parser to parse strings in the first stage
(parse_label): not needed right now
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 62 +-
1 file changed, 1
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg):
Expected first layer done
(parse_reg_operand): Likewise.
(parse_asm_arg): Likewise.
(parse_format_strings): Likewise.
(parse_asm): Likewise.
(validate): Lik
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: Liam Naddell
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Remove unnecessary include.
Signed-off-by: Liam Naddell
---
gcc/rust/ast/rust-expr.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 8fc89d87878..25afe235e4e
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: Marc Poulhiès
The visitor was still using the as_string() method.
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::do_matcharm): New.
(Dump::do_matchcase): New.
(Dump::visit(MatchExpr)): Adjust, don't use as_string.
* hir/rust-hir-dump.h (Dump::do_matcharm
From: Antonio Gomes
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h: Add new get_operator_str method in
ArithmeticOrLogicalExpr and CompoundAssignmentExpr
* hir/tree/rust-hir.cc: Likewise
* typecheck/rust-hir-type-check-expr.cc: Improve error message for
ope
From: Pierre-Emmanuel Patry
gcc/rust/ChangeLog:
* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
Adapt function call to new return type.
* backend/rust-mangle-v0.cc (v0_path): Likewise.
* checks/errors/rust-const-checker.cc
(ConstChecker::c
From: Pierre-Emmanuel Patry
Make the API more convenient by changing the function's return type. We
can now differentiate between a stored null pointer and a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_defid_mapping): Adapt call
to new return type
From: Pierre-Emmanuel Patry
Wrap the return type with an optional.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address):
Update code around lookup return type.
* typecheck/rust-tyty-bounds.cc
(TypeCheckBase::get_predicate_from_boun
From: Pierre-Emmanuel Patry
Wrap the return type into an optional.
gcc/rust/ChangeLog:
* checks/errors/privacy/rust-visibility-resolver.cc: Update function
call to match the new return type.
* typecheck/rust-hir-type-check-path.cc
(TypeCheckExpr::resolve_root_path):
From: Pierre-Emmanuel Patry
Change their return type to a const reference in order to avoid copies
when possible. Also wrap this new return type into an optional.
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go):
Adapt the code to the new r
From: Pierre-Emmanuel Patry
Wrap the return type within an optional. Now return the parent id within
a pair instead of taking an out reference.
gcc/rust/ChangeLog:
* backend/rust-compile-item.cc (CompileItem::visit): Change call site
to accept new return type.
* backend/
From: Pierre-Emmanuel Patry
Make the function's return type optional in order to differentiate
between null pointers and missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_path_expr_seg): Change
call site to accomodate the new return type.
(M
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional in order to tell
appart a null pointer from a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_type): Change call site
to accomodate the new return type.
(Mappings
From: Pierre-Emmanuel Patry
Change the return type to an optional.
gcc/rust/ChangeLog:
* typecheck/rust-type-util.cc (query_type): Adapt code to accomodate
the new return type.
* util/rust-hir-map.cc (Mappings::lookup_impl_block_type): Change
the function's retur
From: Pierre-Emmanuel Patry
Change the return type to an optional.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::resolve_nodeid_to_stmt): Change the
return type and remove pointer out argument.
* util/rust-hir-map.h: Update function prototype.
Signed-off-by: Pie
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: Pierre-Emmanuel Patry
Wrap the function's return type within an optional to differentiate
between a null ppointer and a missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_param): Change call site
to accomodate new return type.
(Mappings
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: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc
(HIRCompileBase::compile_function_body):
Adjust unit_expression calls.
(HIRCompileBase::unit_expression):
Remove unused Context parameter.
* backend/rust-compile-base.h
(HI
From: Pierre-Emmanuel Patry
Change the return type to an optional in order to easily differentiate
between a null pointer and an missing value.
gcc/rust/ChangeLog:
* checks/errors/rust-unsafe-checker.cc
(UnsafeChecker::check_function_call):
Adapt function call to new return typ
1 - 100 of 159 matches
Mail list logo