blob: a87478e221b08e0da3be8991736cc3bce44d69e4 (
plain)
1
2
3
4
5
6
7
8
|
// Verify that single-variant enums can't be de-referenced
// Regression test for issue #9814
enum Foo { Bar(isize) }
fn main() {
let _ = *Foo::Bar(2); //~ ERROR type `Foo` cannot be dereferenced
}
|