mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
12 lines
156 B
Rust
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);
|
|
}
|