[gccrs COMMIT 1/2] rust: add feature gate for lang_items.

2025-11-28 Thread gerris . rs
From: Raiki Tamura gcc/rust/ChangeLog: * checks/errors/feature/rust-feature-gate.cc (FeatureGate::visit): Add check for lang_items. * checks/errors/feature/rust-feature-gate.h: Likewise. Signed-off-by: Raiki Tamura --- This change was merged into the gccrs repository and is po

[gccrs COMMIT] Remove non leaf errors

2025-11-28 Thread gerris . rs
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_function): Return a nullptr on error instead of a valid function. (Parser::parse_let_stmt): Remove non leaf error. (Parser::parse_if_expr): Likewise. (Parser::parse_lo

[gccrs COMMIT] Remove non-leaf error message in delimited tt

2025-11-28 Thread gerris . rs
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_delim_token_tree): Remove error message. (Parser::parse_token_tree): Split error message. gcc/testsuite/ChangeLog: * rust/compile/macros/mbe/macro-issue3608.rs: Remove error

[gccrs COMMIT] Initialize uninit boolean

2025-11-28 Thread gerris . rs
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * backend/rust-constexpr.cc (eval_binary_expression): Set initial value equality value to false. Signed-off-by: Pierre-Emmanuel Patry --- This change was merged into the gccrs repository and is posted here for upstream visibility

[gccrs COMMIT] gccrs: Fix comment typos in rust-macro-expand.h

2025-11-27 Thread gerris . rs
From: Jonathan Wakely gcc/rust/ChangeLog: * expand/rust-macro-expand.h: Fix typos in comment. --- This change was merged into the gccrs repository and is posted here for upstream visibility and potential drive-by review, as requested by GCC release managers. Each commit email contains a

[gccrs COMMIT] Remove non-leaf item in crate parsing failure error

2025-11-27 Thread gerris . rs
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_items): Remove item parsing error. gcc/testsuite/ChangeLog: * rust/compile/braced_macro_arm.rs: Remove superfluous error message matching. * rust/compile/decl_macro6

[gccrs COMMIT] Add derived set to collect derived nodes.

2025-11-26 Thread gerris . rs
From: Ryutaro Okada <[email protected]> gcc/rust/ChangeLog: * expand/rust-expand-visitor.cc (builtin_derive_item): Collect derived nodes. (derive_item): Collect derived nodes. * util/rust-hir-map.cc (Mappings::add_derived_nodes): Add derived set to collect derived

[gccrs COMMIT 2/2] Add test for issue Rust-GCC#3608

2025-11-23 Thread gerris . rs
From: Lúcio Boari Fleury gcc/testsuite/ChangeLog: * rust/compile/macros/mbe/macro-issue3608.rs: New Test. The test skips an issue at line 11 Signed-off-by: Lúcio Boari Fleury --- This change was merged into the gccrs repository and is posted here for upstream visibility and potential

[gccrs COMMIT 1/2] stop an infinite loop at END_OF_FILE

2025-11-23 Thread gerris . rs
From: Lúcio Boari Fleury gcc/rust/ChangeLog: * parse/rust-parse-impl.h: Add early exit condition to parsing loop. Signed-off-by: Lúcio Boari Fleury --- This change was merged into the gccrs repository and is posted here for upstream visibility and potential drive-by review, as requeste

[gccrs COMMIT] gccrs: Add support for initial generic associated types

2025-11-19 Thread gerris . rs
From: Philip Herron This patch is the initial part in supporting generic associated types. In rust we have trait item types that get implemented for example: trait Foo { type Bar } impl Foo for T { type Bar = T } The trait position uses a Ty::Placeholder which is just a thing

[gccrs COMMIT] gccrs: add error check if derive has wrong item

2025-11-17 Thread gerris . rs
From: Lucas Ly Ba Derive may only be applied to structs, enums and unions. gcc/rust/ChangeLog: * expand/rust-derive.cc (DeriveVisitor::derive): Add check and error. gcc/testsuite/ChangeLog: * rust/compile/issue-3971.rs: New test. Signed-off-by: Lucas Ly Ba --- This c

[gccrs COMMIT] gccrs: fix segfault on empty doc attribute

2025-11-17 Thread gerris . rs
From: Lucas Ly Ba gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_doc_item_attribute): Make error. gcc/testsuite/ChangeLog: * rust/compile/issue-4226.rs: New test. Signed-off-by: Lucas Ly Ba --- This change was merged into the gccrs repository and i

[gccrs COMMIT] gccrs: Fix compile_float_literal not compiling negatives properly

2025-11-17 Thread gerris . rs
From: Yap Zhi Heng gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (compile_float_literal): Add is_negative check to compile negative float literals properly. * backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit(RangePattern)): Minor optimization

[gccrs COMMIT] Improve feature handling

2025-11-14 Thread gerris . rs
From: Owen Avery This includes a program, written using flex and bison, to extract information on unstable features from rustc source code and save it to a header file. The script does fetch files from https://github.com/rust-lang/rust (the official rustc git repository), which should be alright