summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/assoc-oddities-1.rs
blob: 5914805e5c1c858ced76b635b6e61e3c46d0df62 (plain)
1
2
3
4
5
6
7
8
9
10
11
// compile-flags: -Z parse-only

fn main() {
    // 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?
    // N.B., `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=`
    // see assoc-oddities-2 and assoc-oddities-3
    ..if c { a } else { b }[n]; //~ ERROR expected one of
}