rust/tests/ui/const-generics/issues/issue-99641.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
389 B
Rust
Raw Normal View History

#![feature(adt_const_params)]
#![allow(incomplete_features)]
fn main() {
pub struct Color<const WHITE: (fn(),)>;
//~^ ERROR using function pointers
impl<const WHITE: (fn(),)> Color<WHITE> {
//~^ ERROR using function pointers
pub fn new() -> Self {
Color::<WHITE>
}
}
pub const D65: (fn(),) = (|| {},);
Color::<D65>::new();
}