Skip to content

Conversation

@P-E-P
Copy link
Member

@P-E-P P-E-P commented Nov 26, 2025

Error messages within GCCRS are unclear, mainly because we're emitting up to five error messages for the same error. This PR aims to bring that number down and keep only leaf errors unless the higher context is required.

@P-E-P P-E-P force-pushed the remove-non-leaf-errors branch from 07b89fc to b7c563d Compare November 26, 2025 15:37
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.rs: Likewise.
	* rust/compile/decl_macro7.rs: Likewise.
	* rust/compile/extern_type_item_missing_semi.rs: Likewise.
	* rust/compile/issue-2187.rs: Likewise.
	* rust/compile/issue-407-2.rs: Likewise.
	* rust/compile/issue-407.rs: Likewise.
	* rust/compile/issue-4162.rs: Likewise.
	* rust/compile/issue-867.rs: Likewise.
	* rust/compile/macros/mbe/macro-issue1053-2.rs: Likewise.
	* rust/compile/macros/mbe/macro-issue1395-2.rs: Likewise.
	* rust/compile/macros/mbe/macro-issue3608.rs: Likewise.
	* rust/compile/macros/mbe/macro27.rs: Likewise.
	* rust/compile/macros/mbe/macro28.rs: Likewise.
	* rust/compile/macros/mbe/macro29.rs: Likewise.
	* rust/compile/macros/mbe/macro30.rs: Likewise.
	* rust/compile/macros/mbe/macro31.rs: Likewise.
	* rust/compile/macros/mbe/macro33.rs: Likewise.
	* rust/compile/macros/mbe/macro35.rs: Likewise.
	* rust/compile/macros/mbe/macro37.rs: Likewise.
	* rust/compile/macros/mbe/macro38.rs: Likewise.
	* rust/compile/macros/mbe/macro39.rs: Likewise.
	* rust/compile/macros/mbe/macro48.rs: Likewise.
	* rust/compile/parse_invalid_specialization.rs: Likewise.
	* rust/compile/parse_simple_path_fail_1.rs: Likewise.
	* rust/compile/parse_simple_path_fail_2.rs: Likewise.
	* rust/compile/raw-string-loc.rs: Likewise.
	* rust/compile/raw-byte-string-loc.rs: Likewise.
	* rust/compile/self_const_ptr.rs: Likewise.
	* rust/compile/self_mut_ptr.rs: Likewise.
	* rust/compile/static_var1.rs: Likewise.
	* rust/compile/self_ptr.rs: Likewise.
	* rust/compile/torture/identifier-missing-impl-1.rs: Likewise.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
@P-E-P P-E-P force-pushed the remove-non-leaf-errors branch from b7c563d to c3f426a Compare November 26, 2025 15:46
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM we need to do a lot of this our error diagnostics are noisy i've been trying to fix this in typecheck over time too

@P-E-P P-E-P added this pull request to the merge queue Nov 27, 2025
Merged via the queue into Rust-GCC:master with commit 9a982bd Nov 27, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants