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
268 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)]
struct Foo(#[allow(dead_code)] [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);
}