Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
box
/
unit
/
unique-destructure.rs
blob: 2ddb3c452cd59cccae6ce9a7caa1b63444d95bbc [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
feature
(
box_patterns
)]
struct
Foo
{
a
:
isize
,
b
:
isize
}
pub
fn
main
()
{
let
box
Foo
{
a
,
b
}
=
Box
::
new
(
Foo
{
a
:
100
,
b
:
200
});
assert_eq
!(
a
+
b
,
300
);
}