2020-08-09 00:01:19 -05:00
|
|
|
//@ check-pass
|
|
|
|
//@ run-rustfix
|
|
|
|
//@ revisions: full min
|
|
|
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
#![warn(unused_braces)]
|
|
|
|
|
|
|
|
|
|
|
|
struct A<const N: usize>;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: A<7>; // ok
|
2020-08-10 13:50:58 -05:00
|
|
|
let _: A<7>; //~ WARN unnecessary braces
|
2020-08-09 00:01:19 -05:00
|
|
|
let _: A<{ 3 + 5 }>; // ok
|
|
|
|
}
|