diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/closures/issue-10398.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/closures/issue-10398.rs b/src/test/ui/closures/issue-10398.rs new file mode 100644 index 000000000..0405b2d01 --- /dev/null +++ b/src/test/ui/closures/issue-10398.rs @@ -0,0 +1,11 @@ +#![feature(box_syntax)] + +fn main() { + let x: Box<_> = box 1; + let f = move|| { + let _a = x; + drop(x); + //~^ ERROR: use of moved value: `x` + }; + f(); +} |