mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
17 lines
326 B
Rust
17 lines
326 B
Rust
//@ known-bug: rust-lang/rust#129075
|
|
//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
|
|
|
|
struct Foo<T>([T; 2]);
|
|
|
|
impl<T: Default + Copy> Default for Foo<T> {
|
|
fn default(&mut self) -> Self {
|
|
Foo([Default::default(); 2])
|
|
}
|
|
}
|
|
|
|
fn field_array() {
|
|
let a: i32;
|
|
let b;
|
|
Foo([a, b]) = Default::default();
|
|
}
|