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