2015-01-08 22:02:42 +11:00
|
|
|
struct MyStruct { field: usize }
|
2014-11-25 10:19:58 +01:00
|
|
|
const STRUCT: MyStruct = MyStruct { field: 42 };
|
|
|
|
|
|
|
|
fn main() {
|
2015-01-08 21:54:35 +11:00
|
|
|
let a: [isize; STRUCT.nonexistent_field];
|
2016-09-28 19:27:23 +10:00
|
|
|
//~^ no field `nonexistent_field` on type `MyStruct`
|
2014-11-25 10:19:58 +01:00
|
|
|
}
|