diff options
Diffstat (limited to 'tests/ui/unique/unique-mutable.rs')
-rw-r--r-- | tests/ui/unique/unique-mutable.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-mutable.rs b/tests/ui/unique/unique-mutable.rs new file mode 100644 index 000000000..0367c0809 --- /dev/null +++ b/tests/ui/unique/unique-mutable.rs @@ -0,0 +1,7 @@ +// run-pass + +pub fn main() { + let mut i: Box<_> = Box::new(0); + *i = 1; + assert_eq!(*i, 1); +} |