2015-08-06 16:57:31 -05:00
|
|
|
// compile-flags: --crate-type=lib
|
|
|
|
|
2011-08-02 22:46:36 -05:00
|
|
|
// Preserve semicolons that disambiguate unops
|
|
|
|
|
|
|
|
fn f() { }
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn block_semi() -> isize { { f() }; -1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn block_nosemi() -> isize { ({ 0 }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn if_semi() -> isize { if true { f() } else { f() }; -1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn if_nosemi() -> isize { (if true { 0 } else { 0 }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn alt_semi() -> isize { match true { true => { f() } _ => { } }; -1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn alt_no_semi() -> isize { (match true { true => { 0 } _ => { 1 } }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2015-01-25 15:05:03 -06:00
|
|
|
fn stmt() { { f() }; -1; }
|