summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0040.fixed
blob: 139dc8f94964f527809fabd935f4e01047eb2b4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-rustfix
struct Foo {
    x: i32,
}

impl Drop for Foo {
    fn drop(&mut self) {
        println!("kaboom");
    }
}

fn main() {
    let mut x = Foo { x: -7 };
    x.x = 0;
    println!("{}", x.x);
    drop(x);
    //~^ ERROR E0040
}