rust/src/test/ui/const-generics/invalid-enum.rs

18 lines
338 B
Rust
Raw Normal View History

2020-08-21 22:32:07 -05:00
#![feature(const_generics)]
#![allow(incomplete_features)]
#[derive(PartialEq, Eq)]
enum CompileFlag {
A,
B,
}
pub fn test<const CF: CompileFlag>() {}
pub fn main() {
test::<CompileFlag::A>();
//~^ ERROR: expected type, found variant
//~| ERROR: wrong number of const arguments
//~| ERROR: wrong number of type arguments
}