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