diff options
| author | bors <bors@rust-lang.org> | 2018-10-02 20:46:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-10-02 20:46:49 +0000 |
| commit | 2bd5993ca25e09b894e4fd6539a2fba64599eee2 (patch) | |
| tree | ecbbdba45817bf94647cf23af996f42abb608fdb /src/test/ui/borrowck | |
| parent | 1c5e9c68ea6c76fe400528de17ebe03e338bac68 (diff) | |
| parent | 671e77d60b075ff3a757e1c528e759ac95fc1e13 (diff) | |
Auto merge of #54343 - blitzerr:master, r=nikomatsakis
First shot at #54015 Closes #54015
Diffstat (limited to 'src/test/ui/borrowck')
6 files changed, 10 insertions, 10 deletions
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<bool>`, 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 |
