about summary refs log tree commit diff
path: root/tests/ui/consts/issue-19244-2.rs
blob: 87f8c1581a75080aafe92783bd9399a3a5509564 (plain)
1
2
3
4
5
6
7
struct MyStruct { field: usize }
const STRUCT: MyStruct = MyStruct { field: 42 };

fn main() {
    let a: [isize; STRUCT.nonexistent_field];
    //~^ ERROR no field `nonexistent_field` on type `MyStruct`
}