2015-10-16 21:06:25 +00:00
|
|
|
|
// compile-flags: -Z parse-only
|
|
|
|
|
|
2019-01-06 15:33:05 +00:00
|
|
|
|
fn main() {
|
2015-10-16 21:06:25 +00:00
|
|
|
|
// following lines below parse and must not fail
|
|
|
|
|
x = if c { a } else { b }();
|
|
|
|
|
x = if true { 1 } else { 0 } as *mut _;
|
|
|
|
|
// however this does not parse and probably should fail to retain compat?
|
2018-11-27 02:59:49 +00:00
|
|
|
|
// N.B., `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=`
|
2015-10-16 21:06:25 +00:00
|
|
|
|
// see assoc-oddities-2 and assoc-oddities-3
|
|
|
|
|
..if c { a } else { b }[n]; //~ ERROR expected one of
|
|
|
|
|
}
|