diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-closures-unique-imm.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-closures-unique-imm.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/test/ui/borrowck/borrowck-closures-unique-imm.rs b/src/test/ui/borrowck/borrowck-closures-unique-imm.rs deleted file mode 100644 index 0dd004769..000000000 --- a/src/test/ui/borrowck/borrowck-closures-unique-imm.rs +++ /dev/null @@ -1,18 +0,0 @@ -struct Foo { - x: isize, -} - -pub fn main() { - let mut this = &mut Foo { - x: 1, - }; - let mut r = || { - let p = &this.x; - &mut this.x; //~ ERROR cannot borrow - p.use_ref(); - }; - r() -} - -trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { } } -impl<T> Fake for T { } |