summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-lend-flow-match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/borrowck/borrowck-lend-flow-match.rs')
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow-match.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/test/ui/borrowck/borrowck-lend-flow-match.rs b/src/test/ui/borrowck/borrowck-lend-flow-match.rs
deleted file mode 100644
index 9737bc769..000000000
--- a/src/test/ui/borrowck/borrowck-lend-flow-match.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-fn separate_arms() {
- // Here both arms perform assignments, but only one is illegal.
-
- let mut x = None;
- match x {
- None => {
- // It is ok to reassign x here, because there is in
- // fact no outstanding loan of x!
- x = Some(0);
- }
- Some(ref r) => {
- x = Some(1); //~ ERROR cannot assign to `x` because it is borrowed
- drop(r);
- }
- }
-}
-
-fn main() {}