summaryrefslogtreecommitdiffstats
path: root/tests/ui/dropck/drop-on-non-struct.rs
blob: 145eab126c28deb1771cde394d7c2a120696c419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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() {}