rust/src/test/ui/unique/unique-mutable.rs
2019-07-27 18:56:16 +03:00

9 lines
121 B
Rust

// run-pass
#![feature(box_syntax)]
pub fn main() {
let mut i: Box<_> = box 0;
*i = 1;
assert_eq!(*i, 1);
}