diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/liveness/liveness-move-call-arg.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/liveness/liveness-move-call-arg.rs b/src/test/ui/liveness/liveness-move-call-arg.rs new file mode 100644 index 000000000..1bc2ea6b9 --- /dev/null +++ b/src/test/ui/liveness/liveness-move-call-arg.rs @@ -0,0 +1,11 @@ +fn take(_x: Box<isize>) {} + + +fn main() { + + let x: Box<isize> = Box::new(25); + + loop { + take(x); //~ ERROR use of moved value: `x` + } +} |