summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dropck/drop-on-non-struct.rs
blob: ef5e18126dc6860bf7e18a1ce3544d1bc190bd6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
impl<'a> Drop for &'a mut isize {
    //~^ ERROR the `Drop` trait may only be implemented for 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() {
}