summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cross-crate/auxiliary/moves_based_on_type_lib.rs
blob: 7e7e3b860242edc89f117bbfd9d86a44ad0af1f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![crate_type="lib"]

pub struct S {
    x: isize,
}

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

pub fn f() {
    let x = S { x: 1 };
    let y = x;
    let _z = y;
}