mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
22 lines
260 B
Rust
22 lines
260 B
Rust
|
#![warn(clippy::empty_drop)]
|
||
|
#![allow(unused)]
|
||
|
|
||
|
// should cause an error
|
||
|
struct Foo;
|
||
|
|
||
|
|
||
|
// shouldn't cause an error
|
||
|
struct Bar;
|
||
|
|
||
|
impl Drop for Bar {
|
||
|
fn drop(&mut self) {
|
||
|
println!("dropping bar!");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// should error
|
||
|
struct Baz;
|
||
|
|
||
|
|
||
|
fn main() {}
|