diff --git a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr index c3f71d60072..b7803cbc804 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr @@ -5,7 +5,7 @@ LL | for &x in &vector { | ------- | | | immutable borrow occurs here - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop LL | let cap = vector.capacity(); LL | vector.extend(repeat(0)); //~ ERROR cannot borrow | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here @@ -17,7 +17,7 @@ LL | for &x in &vector { | ------- | | | immutable borrow occurs here - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop ... LL | vector[1] = 5; //~ ERROR cannot borrow | ^^^^^^ mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr index c46e94866ab..81aa1e2c960 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr @@ -8,13 +8,13 @@ LL | borrow(&*v); //~ ERROR cannot borrow | ^^^ immutable borrow occurs here LL | } LL | *x = box 5; - | -- borrow used here in later iteration of loop + | -- borrow used here, in later iteration of loop error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable --> $DIR/borrowck-lend-flow-loop.rs:109:16 | LL | **x += 1; - | -------- borrow used here in later iteration of loop + | -------- borrow used here, in later iteration of loop LL | borrow(&*v); //~ ERROR cannot borrow | ^^^ immutable borrow occurs here LL | if cond2 { diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr index b3c86a56091..19ec9cf7ded 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ---- ^^^^^^ second mutable borrow occurs here | | - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop ... LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ------ first mutable borrow occurs here @@ -13,7 +13,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-mut-borrow-linear-errors.rs:25:30 | LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] - | ---- borrow used here in later iteration of loop + | ---- borrow used here, in later iteration of loop LL | //[mir]~^ ERROR [E0499] LL | 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ^^^^^^ second mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr index b3c86a56091..19ec9cf7ded 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ---- ^^^^^^ second mutable borrow occurs here | | - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop ... LL | _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ------ first mutable borrow occurs here @@ -13,7 +13,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-mut-borrow-linear-errors.rs:25:30 | LL | 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] - | ---- borrow used here in later iteration of loop + | ---- borrow used here, in later iteration of loop LL | //[mir]~^ ERROR [E0499] LL | 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] | ^^^^^^ second mutable borrow occurs here diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 957ccfe45dd..39efdb6ddb4 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -20,7 +20,7 @@ error[E0382]: use of moved value (Mir) --> $DIR/issue-41962.rs:17:21 | LL | if let Some(thing) = maybe { - | ^^^^^ value moved here in previous iteration of loop + | ^^^^^ value moved here, in previous iteration of loop | = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr index 02e5b44c17c..dd445c8c3a0 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr @@ -17,7 +17,7 @@ LL | let inner_second = &mut inner_void; //~ ERROR cannot borrow | ^^^^^^^^^^^^^^^ second mutable borrow occurs here LL | inner_second.use_mut(); LL | inner_first.use_mut(); - | ----------- borrow used here in later iteration of loop + | ----------- borrow used here, in later iteration of loop error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-12041.nll.stderr b/src/test/ui/issues/issue-12041.nll.stderr index b880317a2a6..a0b90c7a34a 100644 --- a/src/test/ui/issues/issue-12041.nll.stderr +++ b/src/test/ui/issues/issue-12041.nll.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `tx` --> $DIR/issue-12041.rs:18:22 | LL | let tx = tx; - | ^^ value moved here in previous iteration of loop + | ^^ value moved here, in previous iteration of loop | = note: move occurs because `tx` has type `std::sync::mpsc::Sender`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr b/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr index e3e389d1197..b25b063f3b6 100644 --- a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr +++ b/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr @@ -5,7 +5,7 @@ LL | let v: Vec<&str> = line.split_whitespace().collect(); | ^^^^ borrowed value does not live long enough LL | //~^ ERROR `line` does not live long enough LL | println!("accumulator before add_assign {:?}", acc.map); - | ------- borrow used here in later iteration of loop + | ------- borrow used here, in later iteration of loop ... LL | } | - `line` dropped here while still borrowed diff --git a/src/test/ui/liveness/liveness-move-in-while.nll.stderr b/src/test/ui/liveness/liveness-move-in-while.nll.stderr index 9f1ffd91518..065e65702b4 100644 --- a/src/test/ui/liveness/liveness-move-in-while.nll.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: borrow of moved value: `y` LL | println!("{}", y); //~ ERROR use of moved value: `y` | ^ value borrowed here after move LL | while true { while true { while true { x = y; x.clone(); } } } - | - value moved here + | - value moved here, in previous iteration of loop | = note: move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/closures-in-loops.stderr b/src/test/ui/nll/closures-in-loops.stderr index 9758a803620..cd7fdbdb6ed 100644 --- a/src/test/ui/nll/closures-in-loops.stderr +++ b/src/test/ui/nll/closures-in-loops.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | || x; //~ ERROR | ^^ - use occurs due to use in closure | | - | value moved into closure here in previous iteration of loop + | value moved into closure here, in previous iteration of loop | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/issue-53807.nll.stderr b/src/test/ui/nll/issue-53807.nll.stderr index 0c019a4ec3c..056046aa43a 100644 --- a/src/test/ui/nll/issue-53807.nll.stderr +++ b/src/test/ui/nll/issue-53807.nll.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value --> $DIR/issue-53807.rs:14:21 | LL | if let Some(thing) = maybe { - | ^^^^^ value moved here in previous iteration of loop + | ^^^^^ value moved here, in previous iteration of loop | = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr index 606d6785422..626ffad5ba7 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr @@ -7,7 +7,7 @@ LL | foo.mutate(); | ^^^^^^^^^^^^ mutable borrow occurs here LL | //~^ ERROR cannot borrow `foo` as mutable LL | println!("foo={:?}", *string); - | ------- borrow used here in later iteration of loop + | ------- borrow used here, in later iteration of loop error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr b/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr index 7aaec700d89..a6d86f67974 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr @@ -2,7 +2,7 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-escape-loop-via-variable.rs:21:13 | LL | let x = 1 + *p; - | -- borrow used here in later iteration of loop + | -- borrow used here, in later iteration of loop LL | p = &x; | ^^ borrowed value does not live long enough LL | } diff --git a/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr b/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr index 2dc758428ef..2f23a444dcc 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr @@ -7,7 +7,7 @@ LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed | ^ use of borrowed `x` LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed LL | _y.push(&mut z); - | -- borrow used here in later iteration of loop + | -- borrow used here, in later iteration of loop error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:16:21 @@ -18,7 +18,7 @@ LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed | ^ use of borrowed `x` LL | _y.push(&mut z); - | -- borrow used here in later iteration of loop + | -- borrow used here, in later iteration of loop error[E0597]: `z` does not live long enough --> $DIR/regions-escape-loop-via-vec.rs:17:17 @@ -26,7 +26,7 @@ error[E0597]: `z` does not live long enough LL | _y.push(&mut z); | -- ^^^^^^ borrowed value does not live long enough | | - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop ... LL | } | - `z` dropped here while still borrowed @@ -38,7 +38,7 @@ LL | let mut _y = vec![&mut x]; | ------ borrow of `x` occurs here ... LL | _y.push(&mut z); - | -- borrow used here in later iteration of loop + | -- borrow used here, in later iteration of loop LL | //~^ ERROR `z` does not live long enough LL | x += 1; //~ ERROR cannot assign | ^^^^^^ use of borrowed `x` diff --git a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr index fd7843f39bc..cff263231dd 100644 --- a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr +++ b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr @@ -5,7 +5,7 @@ LL | for x in &mut xs { | ------- | | | first mutable borrow occurs here - | borrow used here in later iteration of loop + | borrow used here, in later iteration of loop LL | xs.push(1) //~ ERROR cannot borrow `xs` | ^^ second mutable borrow occurs here