Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
structs
/
destructuring-struct-with-dtor-6344.rs
blob: b107a99e89f1d64f0ff4947b5ff739a74bb4b3d7 [
file
] [
log
] [
blame
]
// https://github.com/rust-lang/rust/issues/6344
//@ run-pass
#![
allow
(
non_shorthand_field_patterns
)]
struct
A
{
x
:
usize
}
impl
Drop
for
A
{
fn
drop
(&
mut
self
)
{}
}
pub
fn
main
()
{
let
a
=
A
{
x
:
0
};
let
A
{
x
:
ref
x
}
=
a
;
println
!(
"{}"
,
x
)
}