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