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);
}