Skip to content

Commit f3ac64a

Browse files
committed
Add test of closure vs jump precedence
1 parent 42b4b9c commit f3ac64a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/ui-fulldeps/pprust-parenthesis-insertion.rs

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ static EXPRS: &[&str] = &[
7070
// These mean different things.
7171
"return - 2",
7272
"(return) - 2",
73+
// Closures and jumps have equal precedence.
74+
"|| return break 2",
75+
"return break (|| 2)", // FIXME: no parenthesis needed.
7376
// These mean different things.
7477
"if let _ = true && false {}",
7578
"if let _ = (true && false) {}",

0 commit comments

Comments
 (0)