Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
structs-enums
/
struct-literal-dtor.rs
blob: 30b1f1139389d313778860001ad572a59188220a [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
non_camel_case_types
)]
struct
foo
{
x
:
String
,
}
impl
Drop
for
foo
{
fn
drop
(&
mut
self
)
{
println
!(
"{}"
,
self
.
x
);
}
}
pub
fn
main
()
{
let
_z
=
foo
{
x
:
"Hello"
.
to_string
()
};
}