Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
deriving
/
deriving-default-box.rs
blob: 7dffc3e95ccb8ea9c56478b44db84ac3123402b6 [
file
] [
log
] [
blame
] [
edit
]
//@ 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
);
}