@@ -77,11 +77,11 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
7777 --> $DIR/borrowck-closures-two-mut.rs:24:24
7878 |
7979LL | let c1 = to_fn_mut(|| x = 4);
80- | -- - previous borrow occurs due to use of `x` in closure
80+ | -- - first borrow occurs due to use of `x` in closure
8181 | |
8282 | first mutable borrow occurs here
8383LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once
84- | ^^ - borrow occurs due to use of `x` in closure
84+ | ^^ - second borrow occurs due to use of `x` in closure
8585 | |
8686 | second mutable borrow occurs here
8787LL | //~| ERROR cannot borrow `x` as mutable more than once
@@ -92,11 +92,11 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
9292 --> $DIR/borrowck-closures-two-mut.rs:36:24
9393 |
9494LL | let c1 = to_fn_mut(|| set(&mut x));
95- | -- - previous borrow occurs due to use of `x` in closure
95+ | -- - first borrow occurs due to use of `x` in closure
9696 | |
9797 | first mutable borrow occurs here
9898LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once
99- | ^^ - borrow occurs due to use of `x` in closure
99+ | ^^ - second borrow occurs due to use of `x` in closure
100100 | |
101101 | second mutable borrow occurs here
102102LL | //~| ERROR cannot borrow `x` as mutable more than once
@@ -107,11 +107,11 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
107107 --> $DIR/borrowck-closures-two-mut.rs:44:24
108108 |
109109LL | let c1 = to_fn_mut(|| x = 5);
110- | -- - previous borrow occurs due to use of `x` in closure
110+ | -- - first borrow occurs due to use of `x` in closure
111111 | |
112112 | first mutable borrow occurs here
113113LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once
114- | ^^ - borrow occurs due to use of `x` in closure
114+ | ^^ - second borrow occurs due to use of `x` in closure
115115 | |
116116 | second mutable borrow occurs here
117117LL | //~| ERROR cannot borrow `x` as mutable more than once
@@ -122,11 +122,11 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
122122 --> $DIR/borrowck-closures-two-mut.rs:52:24
123123 |
124124LL | let c1 = to_fn_mut(|| x = 5);
125- | -- - previous borrow occurs due to use of `x` in closure
125+ | -- - first borrow occurs due to use of `x` in closure
126126 | |
127127 | first mutable borrow occurs here
128128LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure)
129- | ^^ - borrow occurs due to use of `x` in closure
129+ | ^^ - second borrow occurs due to use of `x` in closure
130130 | |
131131 | second mutable borrow occurs here
132132...
@@ -137,11 +137,11 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
137137 --> $DIR/borrowck-closures-two-mut.rs:65:24
138138 |
139139LL | let c1 = to_fn_mut(|| set(&mut *x.f));
140- | -- - previous borrow occurs due to use of `x` in closure
140+ | -- - first borrow occurs due to use of `x` in closure
141141 | |
142142 | first mutable borrow occurs here
143143LL | let c2 = to_fn_mut(|| set(&mut *x.f));
144- | ^^ - borrow occurs due to use of `x` in closure
144+ | ^^ - second borrow occurs due to use of `x` in closure
145145 | |
146146 | second mutable borrow occurs here
147147...
0 commit comments