diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-unboxed-closures.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-unboxed-closures.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.rs b/src/test/ui/borrowck/borrowck-unboxed-closures.rs deleted file mode 100644 index f0048dd7d..000000000 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.rs +++ /dev/null @@ -1,17 +0,0 @@ -fn a<F:Fn(isize, isize) -> isize>(mut f: F) { - let g = &mut f; - f(1, 2); //~ ERROR cannot borrow `f` as immutable - use_mut(g); -} -fn b<F:FnMut(isize, isize) -> isize>(f: F) { - f(1, 2); //~ ERROR cannot borrow `f` as mutable, as it is not declared as mutable -} - -fn c<F:FnOnce(isize, isize) -> isize>(f: F) { - f(1, 2); - f(1, 2); //~ ERROR use of moved value -} - -fn main() {} - -fn use_mut<T>(_: &mut T) { } |