mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
13 lines
306 B
Rust
13 lines
306 B
Rust
//@ 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>();
|
|
}
|