mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
18 lines
282 B
Rust
18 lines
282 B
Rust
//@ check-pass
|
|
//@ run-rustfix
|
|
#![warn(unused_braces)]
|
|
|
|
macro_rules! make_1 {
|
|
() => {
|
|
1
|
|
}
|
|
}
|
|
|
|
struct A<const N: usize>;
|
|
|
|
fn main() {
|
|
let _: A<7>; // ok
|
|
let _: A<7>; //~ WARN unnecessary braces
|
|
let _: A<{ 3 + 5 }>; // ok
|
|
let _: A<{make_1!()}>; // ok
|
|
}
|