diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-pat-reassign-binding.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-pat-reassign-binding.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs b/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs deleted file mode 100644 index f02c46fb8..000000000 --- a/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs +++ /dev/null @@ -1,15 +0,0 @@ -fn main() { - let mut x: Option<isize> = None; - match x { - None => { - // Note: on this branch, no borrow has occurred. - x = Some(0); - } - Some(ref i) => { - // But on this branch, `i` is an outstanding borrow - x = Some(*i+1); //~ ERROR cannot assign to `x` because it is borrowed - drop(i); - } - } - x.clone(); // just to prevent liveness warnings -} |