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

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

17 lines
313 B
Rust
Raw Normal View History

//@ check-pass
//@ run-rustfix
//@ revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![warn(unused_braces)]
struct A<const N: usize>;
fn main() {
let _: A<7>; // ok
let _: A<7>; //~ WARN unnecessary braces
let _: A<{ 3 + 5 }>; // ok
}