summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-99641.rs
blob: fae6d3fc41fb86ae77d179e7058bf79e26fecd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![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();
}