2015-03-28 18:09:51 +03:00
|
|
|
// Verify that single-variant enums can't be de-referenced
|
2014-02-25 01:25:53 +01:00
|
|
|
// Regression test for issue #9814
|
|
|
|
|
2015-01-08 21:54:35 +11:00
|
|
|
enum Foo { Bar(isize) }
|
2014-02-25 01:25:53 +01:00
|
|
|
|
|
|
|
fn main() {
|
2014-11-06 00:05:53 -08:00
|
|
|
let _ = *Foo::Bar(2); //~ ERROR type `Foo` cannot be dereferenced
|
2014-02-25 01:25:53 +01:00
|
|
|
}
|