diff options
Diffstat (limited to 'tests/ui/unique/unique-move.rs')
-rw-r--r-- | tests/ui/unique/unique-move.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-move.rs b/tests/ui/unique/unique-move.rs new file mode 100644 index 000000000..40a2718e4 --- /dev/null +++ b/tests/ui/unique/unique-move.rs @@ -0,0 +1,9 @@ +// run-pass +#![allow(unused_mut)] + +pub fn main() { + let i: Box<_> = Box::new(100); + let mut j; + j = i; + assert_eq!(*j, 100); +} |