From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc
(check_match_scrutinee): Add assertion.
* backend/rust-compile-pattern.cc
(CompilePatternCheckExpr::visit):
Handle HIR::PathInExpression matching a non-enum.
gcc/testsuite/ChangeLog:
From: Mael Cravero
Closes #2357
gcc/rust/ChangeLog:
* rust-gcc.cc: remove unnecessary TREE_SIDE_EFFECTS and TREE_READONLY
macros used in arithmetic overflow checks.
Signed-off-by: Mael Cravero
---
gcc/rust/rust-gcc.cc | 17 -
1 file changed, 17 deletions(-)
d
From: Pierre-Emmanuel Patry
Wrap the function's return type within an optional in order to
differentiate null pointers from missing value.
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_hir_self_param): Adapt call
site to new return type.
(Mappings::lookup_
From: Nobel Singh
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (check_match_scrutinee): Handle structs
Signed-off-by: Nobel Singh
---
gcc/rust/backend/rust-compile-expr.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/backend/rust-compile-expr.
From: Pierre-Emmanuel Patry
Wrap the function's return type with an optional.
gcc/rust/ChangeLog:
* typecheck/rust-autoderef.cc: Adapt calling code to new return type.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Likewise.
(TypeCheckExpr::resol
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand_in):
Finish expected parse_reg_operand
(parse_reg_operand_unexpected): Likewise
* expand/rust-macro-builtins-asm.h (parse_reg_operand_unexpected):
Likewise
Signed-off-by: b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
Bug ID: 119333
Summary: [15 regression] Rust bootstrap fails with cargo trying
to download polonius crates
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
Sam James changed:
What|Removed |Added
Target Milestone|--- |15.0
--
You are receiving this mail becaus
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h:
Scaffolding ast visitor for InlineAsm
* ast/rust-ast.cc (InlineAsm::accept_vis): Likewise.
* ast/rust-expr.h: Likewise.
---
gcc/rust/ast/rust-ast-visitor.h | 2 ++
gcc/rust/ast/rust-ast.cc| 7 ++
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_asm):
Clean up monadic operations on expected<>
Signed-off-by: badumbatish
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/g
From: Liam Naddell
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc:
Fix ICE caused by not finding enum variant by adding new error
message
gcc/testsuite/ChangeLog:
* rust/compile/issue-3046.rs:
Add test for new error message
Signed-off-by: Lia
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmOperand):
Partial support for operand
* expand/rust-macro-builtins-asm.cc (parse_reg_operand): Likewise.
(parse_label): Likewise.
* expand/rust-macro-builtins-asm.h (parse_label): Likewi
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
added comments
(parse_options): Likewise
(parse_asm_arg): Likewise
(parse_asm): Likewise
* expand/rust-macro-builtins-asm.h: Likewise
gcc/testsuite/ChangeL
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct TupleTemplateStr):
Store parse result of parse_format_string(s)
* expand/rust-macro-builtins-asm.cc (parse_format_strings):
Likewise
Signed-off-by: badumbatish
---
gcc/rust/ast/rust-expr.h
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.h (enum InlineAsmParseError):
Add WARN_UNUSED_RESULT parse error
(enum WARN_UNUSED_RESULT): Likewise.
Signed-off-by: badumbatish
---
gcc/rust/expand/rust-macro-builtins-asm.h | 3 ++-
1 file changed, 2
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
Move parser and last_token_id to InlineAsmCtx to prepapre
for tl::expected.
(parse_reg): Likewise.
(parse_operand): Likewise.
(parse_reg_operand): Likewise.
From: Arthur Cohen
This is quite a rough fix (like a lot of the macro expansion code...) but
it allows built-in macros to be treated as statements. I *think* asm!()
might be the only one where it really matters, but also doing something
like
{
line!();
}
will now work, whereas before the ma
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
Finish incorporating expected of parse_reg_operand
(parse_reg): Likewise.
(parse_reg_operand): Likewise.
(parse_reg_operand_in): Likewise.
(parse_reg_operan
From: Kushal Pal
gcc/rust/ChangeLog:
* Make-lang.in: Compile new file.
* checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go):
Use new class to report errors.
* checks/errors/borrowck/rust-borrow-checker-diagnostics.cc: New file.
* checks/erro
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Addresses warning, put warn unused in right place
(parse_reg_operand_inout): Likewise.
(parse_asm_arg): Likewise.
* expand/rust-macro-builtins-asm.h (enum WARN_UNUS
From: badumbatish
Change the assert of (expr != nullptr) to
(this->expr != nullptr) because we assigned (std::move(expr)) to
this->expr, no need to assert expr
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct AnonConst):
Change assertion of constructor
(struct InlineAsmOper
From: badumbatish
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect):
Added options for ParseMode
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Likewise.
* expand/rust-macro-builtins-format-args.cc
(MacroBuiltin::format_args_handler):
From: Kushal Pal
libgrust/ChangeLog:
* libformat_parser/Cargo.toml:
Used crate-type instead of depricated crate_type.
* libformat_parser/generic_format_parser/src/lib.rs:
Remove dead code.
* libformat_parser/src/lib.rs: Likewise.
Signed-off-by: Kushal Pal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
--- Comment #3 from Marc Poulhiès ---
Correct. Not sure about having a .cargo at toplevel currently, so I'll simply
--offline for bck, and we'll be able to revisit.
https://github.com/Rust-GCC/gccrs/pull/3505
--
You are receiving this mail bec
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::visit): Use std::ignore.
---
.../errors/borrowck/rust-bir-builder-expr-stmt.cc | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/r
From: zhanghe9702
gcc/rust/ChangeLog:
* backend/rust-tree.h: removing the CLASSTYPE_VBASECLASSES macro
which is duplicated three times.
Signed-off-by: Zhang He
---
gcc/rust/backend/rust-tree.h | 12
1 file changed, 12 deletions(-)
diff --git a/gcc/rust/backend/rus
From: Jakub Dupak
gcc/rust/ChangeLog:
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi_generated.rs: Error
reporting.
* checks/errors/borrowck/ffi-polonius/src/lib.rs: Error reporting.
* checks/errors/borrowck/polonius/rust-polonius-ffi.h (struct
FactsView):
From: Jakub Dupak
This is minimalistic version to build Polonius with Cargo.
gcc/rust/ChangeLog:
* Make-lang.in: Build Polonius.
Signed-off-by: Jakub Dupak
---
gcc/rust/Make-lang.in | 7 +++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc
(DefaultResolver::visit):
Verify constant item has expression before attempting to visit
the later.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-default-resolver.cc | 15 +---
From: Jakub Dupak
gcc/rust/ChangeLog:
* Make-lang.in: Link Polonius.
* checks/errors/borrowck/rust-borrow-checker.cc: Run Polonius.
Signed-off-by: Jakub Dupak
---
gcc/rust/Make-lang.in | 9 ++---
gcc/rust/checks/errors/borrowck/rust-borrow-
From: Kushal Pal
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Lines
removed as the objects are unused.
Signed-off-by: Kushal Pal
---
gcc/rust/backend/rust-compile-expr.cc | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --g
From: Pierre-Emmanuel Patry
Raw ref operators are still experimental and shall not slip within
stable rust, they should therefore be feature gated.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Gate raw
borrow.
* checks/errors/rust-featur
From: Pierre-Emmanuel Patry
The raw ref operator is an unstable feature required to obtain a pointer
to unaligned adresses (mainly unaligned struct fields) without UB.
gcc/rust/ChangeLog:
* ast/rust-ast-builder.cc (Builder::ref): Adapt constructor to the new
API.
* ast/r
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (check_and_set):
Add checks for duplicate options in inline asm
(parse_options): likewise.
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_illegal_options.rs: New test.
---
gcc/rust/expan
From: jjasmine
Replace scaffolded InlineAsm with real InlineAsm node in rust-expr.h
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parseDirSpec): replace
scaffolded InlineAsm with real InlineAsm.
(parse_clobber_abi): likewise.
(check_and_set): likewise.
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
implemented parse_clobber_abi
(parse_format_string): likewise.
(parseAsmArg): likewise.
(parse_asm): likewise.
* expand/rust-macro-builtins-asm.h (parseAsmA
From: Pierre-Emmanuel Patry
We want to prevent regressions on struct expr field attribute parsing.
gcc/testsuite/ChangeLog:
* rust/compile/struct_expr_field_attributes.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
.../compile/struct_expr_field_attributes.rs | 22 ++
From: Pierre-Emmanuel Patry
Add a few test to check the exclusive range pattern feature. This feature
is experimental and shall not be enabled in stable rust.
gcc/testsuite/ChangeLog:
* rust/compile/exclusive_range_pattern.rs: New test.
* rust/compile/exclusive_range_pattern_fea
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs: New test.
* rust/compile/inline_asm_faulty_clobber_1.rs: New test.
* rust/compile/inline_asm_faulty_clobber_2.rs: New test.
---
.../rust/compile/inline_asm_faulty_clobber.rs | 1
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi): title.
---
gcc/rust/expand/rust-macro-builtins-asm.cc | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc
b/gcc/rust/e
From: jjasmine
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc
(MacroBuiltin::global_asm_handler):
Remove global_asm and non_global_asm handler
(MacroBuiltin::nonglobal_asm_handler): Likewise.
(MacroBuiltin::asm_handler): Likewise.
* expand
From: Pierre-Emmanuel Patry
Add a test for the feature gate, as well as some test to ensure the raw
keyword stays weak. Also add some tests to check whether the raw_ref_op
syntax is parsed correctly.
gcc/testsuite/ChangeLog:
* rust/compile/not_raw_ref_op.rs: New test.
* rust/com
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_nop.rs: Simple test for asm!
---
gcc/testsuite/rust/compile/inline_asm_nop.rs | 10 ++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_nop.rs
diff --git a/gcc/testsuite/
From: jjasmine
Finish up on parse_option, formatted parse_clobber_abi
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi): format
(check_and_set): helper function, is try_set_option equivalent
(parse_options): new function
* expand/rust-mac
From: jjasmine
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_nop_2.rs: New test.
---
gcc/testsuite/rust/compile/inline_asm_nop_2.rs | 10 ++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/inline_asm_nop_2.rs
diff --git a/gcc/testsuite/rust/
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmRegOrRegClass):
Scaffolding parse_reg
* expand/rust-macro-builtins-asm.cc (parse_reg): Likewise.
(parse_operand): Likewise.
(parseAsmArg): Likewise.
---
gcc/rust/ast/rust-expr.h
From: jjasmine
Added tl::expected to parse_operand by implementing the validation
inside the parse_reg_operand function.
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Added tl::expected to parse_operand
* expand/rust-macro-builtins-asm.cc (parse_reg): Likewise.
(parse_r
From: Muhammad Mahad
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
Add rich error message and error code similiar to rustc with
associaed type and trait name
gcc/testsuite/ChangeLog:
* rust/compile/unknown-associated-item.rs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
--- Comment #1 from Sam James ---
In libgrust/libformat_parser/Makefile.am, we have:
```
# TODO: Improve `cargo` invocation with host specific flags, possibly creating
a $(CARGO) variable?
$(LIBFORMAT_PARSER): $(srcdir)/Cargo.toml $(srcdir)/src/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
Sam James changed:
What|Removed |Added
See Also||https://github.com/Rust-GCC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119342
Bug ID: 119342
Summary: block in rust-gcc.cc could use some comments
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: internal-improvement
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
Andrew Pinski changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
From: badumbatish
First scan with "rg -v '\\r' gcc/testsuite/rust | rg 'dg-output'"
gcc/testsuite/ChangeLog:
* rust/execute/torture/issue-2187.rs:
Update pattern with \r* for dg-output tests
* rust/execute/xfail/macro1.rs: Likewise
---
gcc/testsuite/rust/execute/torture
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Fix visitor-related warnings
* ast/rust-ast-collector.h: Likewise.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
* ast/rust-ast-visitor.h: Likewise.
From: jjasmine
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmOperand):
Refactoring and supporting more parse_reg_operand
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Likewise.
(rust_debug): Likewise.
---
gcc/rust/ast/rust-expr.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
Marc Poulhiès changed:
What|Removed |Added
See Also||https://github.com/Rust-GCC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
--- Comment #1 from Andrew Pinski ---
a few others:
block_add_statements
block
function_set_parameters
--
You are receiving this mail because:
You are on the CC list for the bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
--- Comment #2 from Andrew Pinski ---
function_type_variadic
--
You are receiving this mail because:
You are on the CC list for the bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341
--- Comment #3 from Andrew Pinski ---
function_ptr_type uses it already for an example.
--
You are receiving this mail because:
You are on the CC list for the bug.
101 - 159 of 159 matches
Mail list logo