rust/tests/ui/issues/issue-31267-additional.rs

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

21 lines
284 B
Rust
Raw Normal View History

// run-pass
2016-01-31 19:31:06 +00:00
#[derive(Clone, Copy, Debug)]
struct Bar;
const BAZ: Bar = Bar;
#[derive(Debug)]
2022-07-25 20:36:03 +00:00
struct Foo(#[allow(unused_tuple_struct_fields)] [Bar; 1]);
2016-01-31 19:31:06 +00:00
struct Biz;
impl Biz {
const BAZ: Foo = Foo([BAZ; 1]);
}
fn main() {
let foo = Biz::BAZ;
println!("{:?}", foo);
}