mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
15 lines
327 B
Rust
15 lines
327 B
Rust
impl<'a> Drop for &'a mut isize {
|
|
//~^ ERROR the `Drop` trait may only be implemented for local structs, enums, and unions
|
|
//~^^ ERROR E0117
|
|
fn drop(&mut self) {
|
|
println!("kaboom");
|
|
}
|
|
}
|
|
|
|
impl Drop for Nonexistent {
|
|
//~^ ERROR cannot find type `Nonexistent`
|
|
fn drop(&mut self) {}
|
|
}
|
|
|
|
fn main() {}
|