]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dropck/drop-on-non-struct.rs
Auto merge of #102717 - beetrees:repr128-c-style-debuginfo, r=nagisa
[rust.git] / src / test / 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() {}