diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs deleted file mode 100644 index fa2d5531b..000000000 --- a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Test that attempt to move `&mut` pointer while pointee is borrowed -// yields an error. -// -// Example from compiler/rustc_borrowck/borrowck/README.md - - - -fn foo(t0: &mut isize) { - let p: &isize = &*t0; // Freezes `*t0` - let t1 = t0; //~ ERROR cannot move out of `t0` - *t1 = 22; - p.use_ref(); -} - -fn main() { -} - -trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } } -impl<T> Fake for T { } |