rust/tests/ui/error-codes/E0451.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
293 B
Rust
Raw Normal View History

mod bar {
2016-08-19 14:44:47 +00:00
pub struct Foo {
pub a: isize,
b: isize,
}
2016-08-27 20:28:38 +00:00
pub struct FooTuple (
pub isize,
isize,
);
}
fn pat_match(foo: bar::Foo) {
let bar::Foo{a, b} = foo; //~ ERROR E0451
2016-08-27 20:28:38 +00:00
}
2016-08-19 14:44:47 +00:00
fn main() {
let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
2016-08-19 14:44:47 +00:00
}