]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/const.rs
When finding a match expr with a single arm that requires more, suggest it
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / const.rs
1 // FIXME(tschottdorf): this test should pass.
2
3 #[derive(PartialEq, Eq)]
4 struct Foo {
5     bar: i32,
6 }
7
8 const FOO: Foo = Foo{bar: 5};
9
10 fn main() {
11     let f = Foo{bar:6};
12
13     match &f {
14         FOO => {}, //~ ERROR mismatched types
15         _ => panic!(),
16     }
17 }