rust/src/test/ui/const-generics/issues/issue-74255.rs

21 lines
429 B
Rust
Raw Normal View History

// [full] check-pass
// revisions: full min
#![cfg_attr(full, feature(const_param_types))]
#![cfg_attr(full, allow(incomplete_features))]
2020-07-16 05:46:02 -05:00
#[derive(PartialEq, Eq)]
enum IceEnum {
Variant
}
struct IceStruct;
impl IceStruct {
fn ice_struct_fn<const I: IceEnum>() {}
//[min]~^ ERROR `IceEnum` is forbidden as the type of a const generic parameter
2020-07-16 05:46:02 -05:00
}
fn main() {
IceStruct::ice_struct_fn::<{IceEnum::Variant}>();
}