Files
rust/src/test/ui/error-codes/E0532.rs

15 lines
335 B
Rust
Raw Normal View History

fn main() {
let value = 1;
match SomeStruct(value) {
StructConst1(_) => { },
//~^ ERROR expected tuple struct/variant, found constant `StructConst1`
_ => { },
}
struct SomeStruct(u8);
const StructConst1 : SomeStruct = SomeStruct(1);
const StructConst2 : SomeStruct = SomeStruct(2);
}