mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-20 04:24:41 +00:00
21 lines
284 B
Rust
21 lines
284 B
Rust
// run-pass
|
|
|
|
#[derive(Clone, Copy, Debug)]
|
|
struct Bar;
|
|
|
|
const BAZ: Bar = Bar;
|
|
|
|
#[derive(Debug)]
|
|
struct Foo(#[allow(unused_tuple_struct_fields)] [Bar; 1]);
|
|
|
|
struct Biz;
|
|
|
|
impl Biz {
|
|
const BAZ: Foo = Foo([BAZ; 1]);
|
|
}
|
|
|
|
fn main() {
|
|
let foo = Biz::BAZ;
|
|
println!("{:?}", foo);
|
|
}
|