Add test of closure vs jump precedence

This commit is contained in:
David Tolnay 2024-12-02 17:23:12 -08:00
parent 42b4b9c669
commit f3ac64ac34
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -70,6 +70,9 @@ static EXPRS: &[&str] = &[
// These mean different things.
"return - 2",
"(return) - 2",
// Closures and jumps have equal precedence.
"|| return break 2",
"return break (|| 2)", // FIXME: no parenthesis needed.
// These mean different things.
"if let _ = true && false {}",
"if let _ = (true && false) {}",