summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/bare-struct-body.rs
blob: a557e861deeef2c629e182a5512da6ec4158bdf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct Foo {
    val: (),
}

fn foo() -> Foo { //~ ERROR struct literal body without path
    val: (),
}

fn main() {
    let x = foo();
    x.val == 42; //~ ERROR mismatched types
    let x = { //~ ERROR struct literal body without path
        val: (),
    };
}