rust/tests/ui/const-generics/unused_braces.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
194 B
Rust
Raw Normal View History

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