Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser rejects "fail []" #675

Closed
jruderman opened this issue Jul 12, 2011 · 1 comment
Closed

parser rejects "fail []" #675

jruderman opened this issue Jul 12, 2011 · 1 comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jruderman
Copy link
Contributor

fn main() {
    fail [];
}

/Users/jruderman/Desktop/a.rs:2:9:2:10: error: expected ';' or '}' after expression but found [

The parser should accept this, leaving it for the type-checker to complain about. Found through AST fuzzing.

@catamorphism
Copy link
Contributor

Happily, the fix for #676 fixes this too. Added the code example as a test case, thanks!

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Enable preadv and pwritev on the BSDs
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants