summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/unused_braces.fixed
blob: 4c1926387b926a4e843b3e6c5176af7d0b964c95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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
}