2021-01-17 18:48:52 -06:00
|
|
|
// run-rustfix
|
2023-03-29 15:18:20 -05:00
|
|
|
|
2023-05-19 04:25:35 -05:00
|
|
|
#![allow(dropping_references)]
|
2023-03-29 15:18:20 -05:00
|
|
|
|
2021-01-17 18:48:52 -06:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Drop for Foo {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
drop(&mut Foo) //~ ERROR explicit use of destructor method
|
|
|
|
}
|