diff options
Diffstat (limited to 'src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs')
-rw-r--r-- | src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs deleted file mode 100644 index d54b09c5d..000000000 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Test that a by-ref `FnMut` closure gets an error when it tries to -// consume a value. - -fn call<F>(f: F) where F : Fn() { - f(); -} - -fn main() { - let y = vec![format!("World")]; - call(|| { - y.into_iter(); - //~^ ERROR cannot move out of `y`, a captured variable in an `Fn` closure - }); -} |