rust/tests/ui/illegal-ufcs-drop.rs

14 lines
182 B
Rust

// run-rustfix
#![allow(drop_ref)]
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {}
}
fn main() {
Drop::drop(&mut Foo) //~ ERROR explicit use of destructor method
}