diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs deleted file mode 100644 index e536d4040..000000000 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::thread; - - - -fn borrow<F>(v: &isize, f: F) where F: FnOnce(&isize) { - f(v); -} - - - -fn box_imm() { - let v: Box<_> = Box::new(3); - let w = &v; - thread::spawn(move|| { - //~^ ERROR cannot move out of `v` because it is borrowed - println!("v={}", *v); - }); - w.use_ref(); -} - -fn box_imm_explicit() { - let v: Box<_> = Box::new(3); - let w = &v; - thread::spawn(move|| { - //~^ ERROR cannot move - println!("v={}", *v); - }); - w.use_ref(); -} - -fn main() { -} - -trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } } -impl<T> Fake for T { } |