2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 05:20:28 -05:00
|
|
|
#![allow(unused_must_use)]
|
2017-07-23 08:20:14 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|