mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
9 lines
204 B
Rust
9 lines
204 B
Rust
// 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
|
|
}
|