mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
14 lines
224 B
Rust
14 lines
224 B
Rust
//@ run-pass
|
|
use std::default::Default;
|
|
|
|
#[derive(Default)]
|
|
struct A {
|
|
foo: Box<[bool]>,
|
|
}
|
|
|
|
pub fn main() {
|
|
let a: A = Default::default();
|
|
let b: Box<[_]> = Box::<[bool; 0]>::new([]);
|
|
assert_eq!(a.foo, b);
|
|
}
|