rust/tests/ui/const-generics/issues/issue-99641.rs
2023-06-01 18:21:42 +00:00

19 lines
441 B
Rust

#![feature(adt_const_params)]
#![allow(incomplete_features)]
fn main() {
pub struct Color<const WHITE: (fn(),)>;
//~^ ERROR `(fn(),)` can't be used as a const parameter type
impl<const WHITE: (fn(),)> Color<WHITE> {
//~^ ERROR `(fn(),)` can't be used as a const parameter type
pub fn new() -> Self {
Color::<WHITE>
}
}
pub const D65: (fn(),) = (|| {},);
Color::<D65>::new();
}