2013-08-12 16:44:07 -07:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
struct a {
|
2015-01-08 22:02:42 +11:00
|
|
|
b: usize,
|
|
|
|
c: usize
|
2013-08-12 16:44:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
impl a {
|
|
|
|
fn foo(&self) {
|
2016-09-28 19:27:23 +10:00
|
|
|
let a { x, y } = self.d; //~ ERROR no field `d` on type `&a`
|
2018-03-19 14:13:57 -07:00
|
|
|
//~^ ERROR struct `a` does not have fields named `x`, `y`
|
|
|
|
//~| ERROR pattern does not mention fields `b`, `c`
|
2013-08-12 16:44:07 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|