summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0451.rs
blob: aa8f051afa7777073c7a287da82cd0595b157403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mod bar {
    pub struct Foo {
        pub a: isize,
        b: isize,
    }

    pub struct FooTuple (
        pub isize,
        isize,
    );
}

fn pat_match(foo: bar::Foo) {
    let bar::Foo{a, b} = foo; //~ ERROR E0451
}

fn main() {
    let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
}