summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs')
-rw-r--r--src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs b/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs
deleted file mode 100644
index 5ff7b1242..000000000
--- a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// edition:2021
-
-
-
-// Tests that two closures cannot simultaneously have mutable
-// and immutable access to the variable. Issue #6801.
-
-#[derive(Debug)]
-struct Point {
- x: i32,
- y: i32,
-}
-
-fn a() {
- let mut p = Point {x: 3, y:4};
- let c2 = || p.y * 5;
- let c1 = || {
- //~^ ERROR cannot borrow `p` as mutable because it is also borrowed as immutable
- dbg!(&p);
- p.x = 4;
- };
- drop(c2);
-}
-
-fn main() {
-}