Skip to content

Commit

Permalink
Update UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Feb 26, 2018
1 parent 99b1054 commit 7ba5fd1
Show file tree
Hide file tree
Showing 168 changed files with 365 additions and 365 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/augmented-assignments.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable
|
LL | let y = Int(2);
| - consider changing this to `mut y`
29 | //~^ consider changing this to `mut y`
LL | //~^ consider changing this to `mut y`
LL | y //~ error: cannot borrow immutable local variable `y` as mutable
| ^ cannot borrow mutably

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/blind-item-item-shadow.stderr
Expand Up @@ -3,14 +3,14 @@ error[E0255]: the name `foo` is defined multiple times
|
LL | mod foo { pub mod foo { } }
| ------- previous definition of the module `foo` here
12 |
LL |
LL | use foo::foo;
| ^^^^^^^^ `foo` reimported here
|
= note: `foo` must be defined only once in the type namespace of this module
help: You can use `as` to change the binding name of the import
|
13 | use foo::foo as other_foo;
LL | use foo::foo as other_foo;
| ^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-13428.stderr
Expand Up @@ -6,7 +6,7 @@ LL | fn foo() -> String { //~ ERROR mismatched types
LL | | format!("Hello {}",
LL | | "world")
LL | | // Put the trailing semicolon on its own line to test that the
17 | | // note message gets the offending semicolon exactly
LL | | // note message gets the offending semicolon exactly
LL | | ;
| | - help: consider removing this semicolon
LL | | }
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-22645.stderr
Expand Up @@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
LL | fn main() {
| - expected `()` because of default return type
24 | let b = Bob + 3.5;
LL | let b = Bob + 3.5;
LL | b + 3 //~ ERROR E0277
| ^^^^^ expected (), found struct `Bob`
|
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/block-result/unexpected-return-on-unit.stderr
Expand Up @@ -8,11 +8,11 @@ LL | foo() //~ ERROR mismatched types
found type `usize`
help: try adding a semicolon
|
19 | foo(); //~ ERROR mismatched types
LL | foo(); //~ ERROR mismatched types
| ^
help: try adding a return type
|
18 | fn bar() -> usize {
LL | fn bar() -> usize {
| ^^^^^^^^

error: aborting due to previous error
Expand Down
26 changes: 13 additions & 13 deletions src/test/ui/borrowck/borrowck-box-insensitivity.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `a`
|
LL | let _x = a.x;
| -- value moved here
36 | //~^ value moved here
LL | //~^ value moved here
LL | let _y = a.y; //~ ERROR use of moved
| ^^ value used here after move
|
Expand All @@ -14,7 +14,7 @@ error[E0382]: use of moved value: `a`
|
LL | let _x = a.x;
| -- value moved here
45 | //~^ value moved here
LL | //~^ value moved here
LL | let _y = a.y; //~ ERROR use of moved
| ^^ value used here after move
|
Expand All @@ -25,7 +25,7 @@ error[E0382]: use of moved value: `a`
|
LL | let _x = a.x;
| -- value moved here
54 | //~^ value moved here
LL | //~^ value moved here
LL | let _y = &a.y; //~ ERROR use of moved
| ^^^ value used here after move
|
Expand Down Expand Up @@ -62,7 +62,7 @@ LL | let _x = &mut a.x;
| --- mutable borrow occurs here (via `a.x`)
LL | let _y = &a.y; //~ ERROR cannot borrow
| ^^^ immutable borrow occurs here (via `a.y`)
86 | //~^ immutable borrow occurs here (via `a.y`)
LL | //~^ immutable borrow occurs here (via `a.y`)
LL | }
| - mutable borrow ends here

Expand All @@ -73,7 +73,7 @@ LL | let _x = &a.x;
| --- immutable borrow occurs here (via `a.x`)
LL | let _y = &mut a.y; //~ ERROR cannot borrow
| ^^^ mutable borrow occurs here (via `a.y`)
93 | //~^ mutable borrow occurs here (via `a.y`)
LL | //~^ mutable borrow occurs here (via `a.y`)
LL | }
| - immutable borrow ends here

Expand All @@ -82,7 +82,7 @@ error[E0382]: use of collaterally moved value: `a.y`
|
LL | let _x = a.x.x;
| -- value moved here
99 | //~^ value moved here
LL | //~^ value moved here
LL | let _y = a.y; //~ ERROR use of collaterally moved
| ^^ value used here after move
|
Expand All @@ -93,7 +93,7 @@ error[E0382]: use of collaterally moved value: `a.y`
|
LL | let _x = a.x.x;
| -- value moved here
107| //~^ value moved here
LL | //~^ value moved here
LL | let _y = a.y; //~ ERROR use of collaterally moved
| ^^ value used here after move
|
Expand All @@ -104,7 +104,7 @@ error[E0382]: use of collaterally moved value: `a.y`
|
LL | let _x = a.x.x;
| -- value moved here
115| //~^ value moved here
LL | //~^ value moved here
LL | let _y = &a.y; //~ ERROR use of collaterally moved
| ^^^ value used here after move
|
Expand All @@ -115,7 +115,7 @@ error[E0505]: cannot move out of `a.y` because it is borrowed
|
LL | let _x = &a.x.x;
| ----- borrow of `a.x.x` occurs here
123| //~^ borrow of `a.x.x` occurs here
LL | //~^ borrow of `a.x.x` occurs here
LL | let _y = a.y;
| ^^ move out of `a.y` occurs here

Expand All @@ -140,10 +140,10 @@ error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed
|
LL | let _x = &mut a.x.x;
| ----- mutable borrow occurs here
146| //~^ mutable borrow occurs here
LL | //~^ mutable borrow occurs here
LL | let _y = &a.y; //~ ERROR cannot borrow
| ^^^ immutable borrow occurs here
148| //~^ immutable borrow occurs here
LL | //~^ immutable borrow occurs here
LL | }
| - mutable borrow ends here

Expand All @@ -152,10 +152,10 @@ error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as
|
LL | let _x = &a.x.x;
| ----- immutable borrow occurs here
154| //~^ immutable borrow occurs here
LL | //~^ immutable borrow occurs here
LL | let _y = &mut a.y; //~ ERROR cannot borrow
| ^^^ mutable borrow occurs here
156| //~^ mutable borrow occurs here
LL | //~^ mutable borrow occurs here
LL | }
| - immutable borrow ends here

Expand Down
12 changes: 6 additions & 6 deletions src/test/ui/borrowck/borrowck-closures-two-mut.stderr
Expand Up @@ -9,7 +9,7 @@ LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable mo
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
25 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand All @@ -24,7 +24,7 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as muta
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
36 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand All @@ -39,7 +39,7 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as muta
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
43 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand Down Expand Up @@ -84,7 +84,7 @@ LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable mo
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
25 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand All @@ -99,7 +99,7 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as muta
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
36 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand All @@ -114,7 +114,7 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as muta
| ^^ - borrow occurs due to use of `x` in closure
| |
| second mutable borrow occurs here
43 | //~| ERROR cannot borrow `x` as mutable more than once
LL | //~| ERROR cannot borrow `x` as mutable more than once
LL | }
| - first borrow ends here

Expand Down
Expand Up @@ -7,7 +7,7 @@ LL | spawn(|| books.push(4));
| may outlive borrowed value `books`
help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword
|
23 | spawn(move || books.push(4));
LL | spawn(move || books.push(4));
| ^^^^^^^

error: aborting due to previous error
Expand Down
Expand Up @@ -7,7 +7,7 @@ LL | Box::new(|| books.push(4))
| may outlive borrowed value `books`
help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword
|
21 | Box::new(move || books.push(4))
LL | Box::new(move || books.push(4))
| ^^^^^^^

error: aborting due to previous error
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-move-error-with-note.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0507]: cannot move out of borrowed content
|
LL | match *f { //~ ERROR cannot move out of
| ^^ cannot move out of borrowed content
22 | //~| cannot move out
LL | //~| cannot move out
LL | Foo::Foo1(num1,
| ---- hint: to prevent move, use `ref num1` or `ref mut num1`
LL | num2) => (),
Expand All @@ -28,7 +28,7 @@ error[E0507]: cannot move out of borrowed content
|
LL | match a.a { //~ ERROR cannot move out of
| ^ cannot move out of borrowed content
58 | //~| cannot move out
LL | //~| cannot move out
LL | n => {
| - hint: to prevent move, use `ref n` or `ref mut n`

Expand Down
Expand Up @@ -3,10 +3,10 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta
|
LL | let y = &mut x;
| - mutable borrow occurs here
16 | //~^ mutable borrow occurs here
LL | //~^ mutable borrow occurs here
LL | let z = &x; //~ ERROR cannot borrow
| ^ immutable borrow occurs here
18 | //~^ immutable borrow occurs here
LL | //~^ immutable borrow occurs here
LL | }
| - mutable borrow ends here

Expand All @@ -15,10 +15,10 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
|
LL | let y = &x;
| - immutable borrow occurs here
27 | //~^ immutable borrow occurs here
LL | //~^ immutable borrow occurs here
LL | let z = &mut x; //~ ERROR cannot borrow
| ^ mutable borrow occurs here
29 | //~^ mutable borrow occurs here
LL | //~^ mutable borrow occurs here
LL | }
| - immutable borrow ends here

Expand All @@ -27,10 +27,10 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time
|
LL | let y = &mut x;
| - first mutable borrow occurs here
40 | //~^ first mutable borrow occurs here
LL | //~^ first mutable borrow occurs here
LL | let z = &mut x; //~ ERROR cannot borrow
| ^ second mutable borrow occurs here
42 | //~^ second mutable borrow occurs here
LL | //~^ second mutable borrow occurs here
LL | };
| - first borrow ends here

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed
|
LL | [box ref _a, _, _] => {
| ------ borrow of `vec[..]` occurs here
20 | //~^ borrow of `vec[..]` occurs here
LL | //~^ borrow of `vec[..]` occurs here
LL | vec[0] = box 4; //~ ERROR cannot assign
| ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here

Expand All @@ -12,7 +12,7 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed
|
LL | &mut [ref _b..] => {
| ------ borrow of `vec[..]` occurs here
32 | //~^ borrow of `vec[..]` occurs here
LL | //~^ borrow of `vec[..]` occurs here
LL | vec[0] = box 4; //~ ERROR cannot assign
| ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-41962.stderr
Expand Up @@ -26,7 +26,7 @@ LL | if let Some(thing) = maybe {
LL | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382]
LL | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382]
LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
21 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
LL | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382]
LL | | }
| |_________^ value used here after move
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-7573.stderr
Expand Up @@ -3,7 +3,7 @@ error: borrowed data cannot be stored outside of its closure
|
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
| - cannot infer an appropriate lifetime...
28 | //~^ NOTE cannot infer an appropriate lifetime
LL | //~^ NOTE cannot infer an appropriate lifetime
LL | let push_id = |installed_id: &CrateId| {
| ------- ------------------------ borrowed data cannot outlive this closure
| |
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/borrowck/mut-borrow-in-loop.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
LL | (self.func)(arg) //~ ERROR cannot borrow
| ^^^ mutable borrow starts here in previous iteration of loop
21 | }
LL | }
LL | }
| - mutable borrow ends here

Expand All @@ -12,7 +12,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
LL | (self.func)(arg) //~ ERROR cannot borrow
| ^^^ mutable borrow starts here in previous iteration of loop
27 | }
LL | }
LL | }
| - mutable borrow ends here

Expand All @@ -21,7 +21,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
LL | (self.func)(arg) //~ ERROR cannot borrow
| ^^^ mutable borrow starts here in previous iteration of loop
34 | }
LL | }
LL | }
| - mutable borrow ends here

Expand Down
Expand Up @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure
|
LL | let y = vec![format!("World")];
| - captured outer variable
20 | call(|| {
LL | call(|| {
LL | y.into_iter();
| ^ cannot move out of captured outer variable in an `Fn` closure

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/tab_3.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `some_vec`
|
LL | some_vec.into_iter();
| -------- value moved here
16 | {
LL | {
LL | println!("{:?}", some_vec); //~ ERROR use of moved
| ^^^^^^^^ value used here after move
|
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/coherence-overlap-downstream-inherent.stderr
Expand Up @@ -3,7 +3,7 @@ error[E0592]: duplicate definitions with name `dummy`
|
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
18 | //~^ ERROR E0592
LL | //~^ ERROR E0592
LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
| ------------------- other definition for `dummy`

Expand All @@ -12,7 +12,7 @@ error[E0592]: duplicate definitions with name `f`
|
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
| ^^^^^^^^^^^^^^ duplicate definitions for `f`
24 | //~^ ERROR E0592
LL | //~^ ERROR E0592
LL | impl<X> A<i32, X> { fn f(&self) {} }
| -------------- other definition for `f`
|
Expand Down

0 comments on commit 7ba5fd1

Please sign in to comment.