]> git.lizzy.rs Git - rust.git/blob - tests/ui/dropck/drop-on-non-struct.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / dropck / drop-on-non-struct.rs
1 impl<'a> Drop for &'a mut isize {
2     //~^ ERROR the `Drop` trait may only be implemented for local structs, enums, and unions
3     //~^^ ERROR E0117
4     fn drop(&mut self) {
5         println!("kaboom");
6     }
7 }
8
9 impl Drop for Nonexistent {
10     //~^ ERROR cannot find type `Nonexistent`
11     fn drop(&mut self) {}
12 }
13
14 fn main() {}