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