rust/tests/ui/enum/enum-variant-type-2.rs

10 lines
161 B
Rust

// Test that enum variants are not actually types.
enum Foo {
Bar
}
fn foo(x: Foo::Bar) {} //~ ERROR expected type, found variant `Foo::Bar`
fn main() {}