summaryrefslogtreecommitdiffstats
path: root/tests/ui/liveness/liveness-use-after-move.rs
blob: 46102ca1eb11ebe3d58282e0a63cb881080d1956 (plain)
1
2
3
4
5
6
7
8
fn main() {

    let x: Box<_> = 5.into();
    let y = x;

    println!("{}", *x); //~ ERROR borrow of moved value: `x`
    y.clone();
}