-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.F-final_associated_functions`#![feature(final_associated_functions)]``#![feature(final_associated_functions)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Found thanks to @matthiaskrgr continuously fuzzing https://github.com/fmease/rasur versus rustc (downstream report: fmease/rasur#26).
With the introduction of FAF in PR #151783, we now wrongfully accept the following program (if the feature is enabled):
#![feature(final_associated_functions)]
fn main() {
final;
final 1 + 1;
final { println!("text"); };
}It essentially gets parsed as:
#![feature(final_associated_functions)]
fn main() {
;
1 + 1;
{ println!("text"); };
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.F-final_associated_functions`#![feature(final_associated_functions)]``#![feature(final_associated_functions)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.