summaryrefslogtreecommitdiffstats
path: root/tests/ui/box/unit/unique-fn-arg-mut.rs
blob: 01510200b11b793d48d717c63cfb008fc9d57775 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass

fn f(i: &mut Box<isize>) {
    *i = Box::new(200);
}

pub fn main() {
    let mut i = Box::new(100);
    f(&mut i);
    assert_eq!(*i, 200);
}