rust/tests/ui/suggestions/const-in-struct-pat.rs

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

12 lines
171 B
Rust
Raw Normal View History

#[allow(non_camel_case_types)]
struct foo;
struct Thing {
foo: String,
}
fn example(t: Thing) {
let Thing { foo } = t; //~ ERROR mismatched types
}
fn main() {}