2018-12-16 21:21:47 -06:00
|
|
|
struct A {
|
2015-01-08 05:02:42 -06:00
|
|
|
b: usize,
|
|
|
|
c: usize
|
2013-08-12 18:44:07 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
impl A {
|
2013-08-12 18:44:07 -05:00
|
|
|
fn foo(&self) {
|
2018-12-16 21:21:47 -06:00
|
|
|
let A { x, y } = self.d; //~ ERROR no field `d` on type `&A`
|
|
|
|
//~^ ERROR struct `A` does not have fields named `x`, `y`
|
2018-03-19 16:13:57 -05:00
|
|
|
//~| ERROR pattern does not mention fields `b`, `c`
|
2013-08-12 18:44:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|