rust/tests/ui/unique/unique-fn-arg-mut.rs
2023-01-11 09:32:08 +00:00

12 lines
156 B
Rust

// 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);
}