mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
18 lines
359 B
Rust
18 lines
359 B
Rust
|
// check-pass
|
||
|
// run-rustfix
|
||
|
// revisions: full min
|
||
|
|
||
|
#![cfg_attr(full, feature(const_generics))]
|
||
|
#![cfg_attr(full, allow(incomplete_features))]
|
||
|
#![cfg_attr(min, feature(min_const_generics))]
|
||
|
#![warn(unused_braces)]
|
||
|
|
||
|
|
||
|
struct A<const N: usize>;
|
||
|
|
||
|
fn main() {
|
||
|
let _: A<7>; // ok
|
||
|
let _: A< 7 >; //~ WARN unnecessary braces
|
||
|
let _: A<{ 3 + 5 }>; // ok
|
||
|
}
|