rust/tests/ui/structs/struct-pat-derived-error.rs

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

15 lines
287 B
Rust
Raw Normal View History

struct A {
b: usize,
c: usize
}
impl A {
fn foo(&self) {
let A { x, y } = self.d; //~ ERROR no field `d` on type `&A`
//~^ ERROR struct `A` does not have fields named `x`, `y`
//~| ERROR pattern does not mention fields `b`, `c`
}
}
fn main() {}