about summary refs log tree commit diff
path: root/tests/ui/box/unit/unique-fn-arg-mut.rs
blob: 08d1055c613020f325c6aa8be11627c7120e688d (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);
}