summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/float-generic.rs
blob: b72059b5b1c6a31729819ce14edd95f30336445e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// revisions: simple adt_const_params
#![cfg_attr(adt_const_params, feature(adt_const_params))]
#![cfg_attr(adt_const_params, allow(incomplete_features))]

fn foo<const F: f32>() {}
//~^ ERROR `f32` is forbidden as the type of a const generic parameter

const C: f32 = 1.0;

fn main() {
    foo::<C>();
}