Skip to content

Parser rejects "if (ret) { }" #676

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

Closed
jruderman opened this issue Jul 12, 2011 · 0 comments
Closed

Parser rejects "if (ret) { }" #676

jruderman opened this issue Jul 12, 2011 · 0 comments
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() {
    if (ret) { }
}

/Users/jruderman/Desktop/a.rs:2:15:2:16: error: unexpected token: )

This should be accepted by both the parser and the type-checker (but perhaps trigger a warning). Found through AST fuzzing.

@ghost ghost assigned catamorphism Jul 13, 2011
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
document behavior of \r\n in string literals
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