2017-10-06 15:30:23 -05:00
|
|
|
// FIXME(tschottdorf): this test should pass.
|
|
|
|
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
|
|
struct Foo {
|
|
|
|
bar: i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
const FOO: Foo = Foo{bar: 5};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let f = Foo{bar:6};
|
|
|
|
|
|
|
|
match &f {
|
2017-11-20 06:13:27 -06:00
|
|
|
FOO => {}, //~ ERROR mismatched types
|
2017-10-06 15:30:23 -05:00
|
|
|
_ => panic!(),
|
|
|
|
}
|
|
|
|
}
|