Sign in
rust
/
rust
/
HEAD
/
.
/
tests
/
ui
/
drop
/
explicit-drop-call-named-ref.rs
blob: 59c05ca01a9e0b8e6dc2c26814c17c1a8de47f98 [
file
]
//@ run-rustfix
struct
Foo
;
impl
Drop
for
Foo
{
fn
drop
(&
mut
self
)
{}
}
fn
foo
(
f
:
Foo
)
{
Drop
::
drop
(&
mut
f
);
//~ ERROR explicit use of destructor method
//~| HELP: consider using `drop` function
}
fn
main
()
{
let
f
=
Foo
;
foo
(
f
);
}