diff options
Diffstat (limited to 'src/test/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.rs')
-rw-r--r-- | src/test/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.rs b/src/test/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.rs deleted file mode 100644 index 57198cb95..000000000 --- a/src/test/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![feature(unboxed_closures)] - -// Tests that we can't assign to or mutably borrow upvars from `Fn` -// closures (issue #17780) - -fn main() {} - -fn bar() -> impl Fn() -> usize { - let mut x = 0; - move || { - x += 1; //~ ERROR cannot assign - x - } -} |