2020-03-27 15:56:58 -05:00
|
|
|
// check-pass
|
2020-07-02 00:32:12 -05:00
|
|
|
// run-rustfix
|
2020-03-27 15:56:58 -05:00
|
|
|
#![warn(unused_braces)]
|
|
|
|
|
2023-01-07 09:41:32 -06:00
|
|
|
macro_rules! make_1 {
|
|
|
|
() => {
|
|
|
|
1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-27 15:56:58 -05:00
|
|
|
struct A<const N: usize>;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: A<7>; // ok
|
|
|
|
let _: A<{ 7 }>; //~ WARN unnecessary braces
|
|
|
|
let _: A<{ 3 + 5 }>; // ok
|
2023-01-07 09:41:32 -06:00
|
|
|
let _: A<{make_1!()}>; // ok
|
2020-03-27 15:56:58 -05:00
|
|
|
}
|