blob: cfefa51b93ea77261dd7975e663930d0049d1347 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//@ run-pass
#![allow(unused_must_use)]
pub fn main() {
// Test that lambdas behave as unary expressions with block-like expressions
-if true { 1 } else { 2 } * 3;
|| if true { 1 } else { 2 } * 3;
// The following is invalid and parses as `if true { 1 } else { 2 }; *3`
// if true { 1 } else { 2 } * 3
}
|