Skip to content

Commit 7ba5fd1

Browse files
committed
Update UI tests
1 parent 99b1054 commit 7ba5fd1

File tree

168 files changed

+365
-365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+365
-365
lines changed

src/test/ui/augmented-assignments.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable
33
|
44
LL | let y = Int(2);
55
| - consider changing this to `mut y`
6-
29 | //~^ consider changing this to `mut y`
6+
LL | //~^ consider changing this to `mut y`
77
LL | y //~ error: cannot borrow immutable local variable `y` as mutable
88
| ^ cannot borrow mutably
99

src/test/ui/blind-item-item-shadow.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ error[E0255]: the name `foo` is defined multiple times
33
|
44
LL | mod foo { pub mod foo { } }
55
| ------- previous definition of the module `foo` here
6-
12 |
6+
LL |
77
LL | use foo::foo;
88
| ^^^^^^^^ `foo` reimported here
99
|
1010
= note: `foo` must be defined only once in the type namespace of this module
1111
help: You can use `as` to change the binding name of the import
1212
|
13-
13 | use foo::foo as other_foo;
13+
LL | use foo::foo as other_foo;
1414
| ^^^^^^^^^^^^^^^^^^^^^
1515

1616
error: aborting due to previous error

src/test/ui/block-result/issue-13428.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn foo() -> String { //~ ERROR mismatched types
66
LL | | format!("Hello {}",
77
LL | | "world")
88
LL | | // Put the trailing semicolon on its own line to test that the
9-
17 | | // note message gets the offending semicolon exactly
9+
LL | | // note message gets the offending semicolon exactly
1010
LL | | ;
1111
| | - help: consider removing this semicolon
1212
LL | | }

src/test/ui/block-result/issue-22645.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
1313
|
1414
LL | fn main() {
1515
| - expected `()` because of default return type
16-
24 | let b = Bob + 3.5;
16+
LL | let b = Bob + 3.5;
1717
LL | b + 3 //~ ERROR E0277
1818
| ^^^^^ expected (), found struct `Bob`
1919
|

src/test/ui/block-result/unexpected-return-on-unit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ LL | foo() //~ ERROR mismatched types
88
found type `usize`
99
help: try adding a semicolon
1010
|
11-
19 | foo(); //~ ERROR mismatched types
11+
LL | foo(); //~ ERROR mismatched types
1212
| ^
1313
help: try adding a return type
1414
|
15-
18 | fn bar() -> usize {
15+
LL | fn bar() -> usize {
1616
| ^^^^^^^^
1717

1818
error: aborting due to previous error

src/test/ui/borrowck/borrowck-box-insensitivity.stderr

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0382]: use of moved value: `a`
33
|
44
LL | let _x = a.x;
55
| -- value moved here
6-
36 | //~^ value moved here
6+
LL | //~^ value moved here
77
LL | let _y = a.y; //~ ERROR use of moved
88
| ^^ value used here after move
99
|
@@ -14,7 +14,7 @@ error[E0382]: use of moved value: `a`
1414
|
1515
LL | let _x = a.x;
1616
| -- value moved here
17-
45 | //~^ value moved here
17+
LL | //~^ value moved here
1818
LL | let _y = a.y; //~ ERROR use of moved
1919
| ^^ value used here after move
2020
|
@@ -25,7 +25,7 @@ error[E0382]: use of moved value: `a`
2525
|
2626
LL | let _x = a.x;
2727
| -- value moved here
28-
54 | //~^ value moved here
28+
LL | //~^ value moved here
2929
LL | let _y = &a.y; //~ ERROR use of moved
3030
| ^^^ value used here after move
3131
|
@@ -62,7 +62,7 @@ LL | let _x = &mut a.x;
6262
| --- mutable borrow occurs here (via `a.x`)
6363
LL | let _y = &a.y; //~ ERROR cannot borrow
6464
| ^^^ immutable borrow occurs here (via `a.y`)
65-
86 | //~^ immutable borrow occurs here (via `a.y`)
65+
LL | //~^ immutable borrow occurs here (via `a.y`)
6666
LL | }
6767
| - mutable borrow ends here
6868

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

@@ -82,7 +82,7 @@ error[E0382]: use of collaterally moved value: `a.y`
8282
|
8383
LL | let _x = a.x.x;
8484
| -- value moved here
85-
99 | //~^ value moved here
85+
LL | //~^ value moved here
8686
LL | let _y = a.y; //~ ERROR use of collaterally moved
8787
| ^^ value used here after move
8888
|
@@ -93,7 +93,7 @@ error[E0382]: use of collaterally moved value: `a.y`
9393
|
9494
LL | let _x = a.x.x;
9595
| -- value moved here
96-
107| //~^ value moved here
96+
LL | //~^ value moved here
9797
LL | let _y = a.y; //~ ERROR use of collaterally moved
9898
| ^^ value used here after move
9999
|
@@ -104,7 +104,7 @@ error[E0382]: use of collaterally moved value: `a.y`
104104
|
105105
LL | let _x = a.x.x;
106106
| -- value moved here
107-
115| //~^ value moved here
107+
LL | //~^ value moved here
108108
LL | let _y = &a.y; //~ ERROR use of collaterally moved
109109
| ^^^ value used here after move
110110
|
@@ -115,7 +115,7 @@ error[E0505]: cannot move out of `a.y` because it is borrowed
115115
|
116116
LL | let _x = &a.x.x;
117117
| ----- borrow of `a.x.x` occurs here
118-
123| //~^ borrow of `a.x.x` occurs here
118+
LL | //~^ borrow of `a.x.x` occurs here
119119
LL | let _y = a.y;
120120
| ^^ move out of `a.y` occurs here
121121

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

@@ -152,10 +152,10 @@ error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as
152152
|
153153
LL | let _x = &a.x.x;
154154
| ----- immutable borrow occurs here
155-
154| //~^ immutable borrow occurs here
155+
LL | //~^ immutable borrow occurs here
156156
LL | let _y = &mut a.y; //~ ERROR cannot borrow
157157
| ^^^ mutable borrow occurs here
158-
156| //~^ mutable borrow occurs here
158+
LL | //~^ mutable borrow occurs here
159159
LL | }
160160
| - immutable borrow ends here
161161

src/test/ui/borrowck/borrowck-closures-two-mut.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable mo
99
| ^^ - borrow occurs due to use of `x` in closure
1010
| |
1111
| second mutable borrow occurs here
12-
25 | //~| ERROR cannot borrow `x` as mutable more than once
12+
LL | //~| ERROR cannot borrow `x` as mutable more than once
1313
LL | }
1414
| - first borrow ends here
1515

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

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

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

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

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

src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | spawn(|| books.push(4));
77
| may outlive borrowed value `books`
88
help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword
99
|
10-
23 | spawn(move || books.push(4));
10+
LL | spawn(move || books.push(4));
1111
| ^^^^^^^
1212

1313
error: aborting due to previous error

src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | Box::new(|| books.push(4))
77
| may outlive borrowed value `books`
88
help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword
99
|
10-
21 | Box::new(move || books.push(4))
10+
LL | Box::new(move || books.push(4))
1111
| ^^^^^^^
1212

1313
error: aborting due to previous error

src/test/ui/borrowck/borrowck-move-error-with-note.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0507]: cannot move out of borrowed content
33
|
44
LL | match *f { //~ ERROR cannot move out of
55
| ^^ cannot move out of borrowed content
6-
22 | //~| cannot move out
6+
LL | //~| cannot move out
77
LL | Foo::Foo1(num1,
88
| ---- hint: to prevent move, use `ref num1` or `ref mut num1`
99
LL | num2) => (),
@@ -28,7 +28,7 @@ error[E0507]: cannot move out of borrowed content
2828
|
2929
LL | match a.a { //~ ERROR cannot move out of
3030
| ^ cannot move out of borrowed content
31-
58 | //~| cannot move out
31+
LL | //~| cannot move out
3232
LL | n => {
3333
| - hint: to prevent move, use `ref n` or `ref mut n`
3434

src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta
33
|
44
LL | let y = &mut x;
55
| - mutable borrow occurs here
6-
16 | //~^ mutable borrow occurs here
6+
LL | //~^ mutable borrow occurs here
77
LL | let z = &x; //~ ERROR cannot borrow
88
| ^ immutable borrow occurs here
9-
18 | //~^ immutable borrow occurs here
9+
LL | //~^ immutable borrow occurs here
1010
LL | }
1111
| - mutable borrow ends here
1212

@@ -15,10 +15,10 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
1515
|
1616
LL | let y = &x;
1717
| - immutable borrow occurs here
18-
27 | //~^ immutable borrow occurs here
18+
LL | //~^ immutable borrow occurs here
1919
LL | let z = &mut x; //~ ERROR cannot borrow
2020
| ^ mutable borrow occurs here
21-
29 | //~^ mutable borrow occurs here
21+
LL | //~^ mutable borrow occurs here
2222
LL | }
2323
| - immutable borrow ends here
2424

@@ -27,10 +27,10 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time
2727
|
2828
LL | let y = &mut x;
2929
| - first mutable borrow occurs here
30-
40 | //~^ first mutable borrow occurs here
30+
LL | //~^ first mutable borrow occurs here
3131
LL | let z = &mut x; //~ ERROR cannot borrow
3232
| ^ second mutable borrow occurs here
33-
42 | //~^ second mutable borrow occurs here
33+
LL | //~^ second mutable borrow occurs here
3434
LL | };
3535
| - first borrow ends here
3636

src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed
33
|
44
LL | [box ref _a, _, _] => {
55
| ------ borrow of `vec[..]` occurs here
6-
20 | //~^ borrow of `vec[..]` occurs here
6+
LL | //~^ borrow of `vec[..]` occurs here
77
LL | vec[0] = box 4; //~ ERROR cannot assign
88
| ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here
99

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

src/test/ui/borrowck/issue-41962.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LL | if let Some(thing) = maybe {
2626
LL | | //~^ ERROR use of partially moved value: `maybe` (Ast) [E0382]
2727
LL | | //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382]
2828
LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
29-
21 | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
29+
LL | | //~| ERROR use of moved value: `maybe` (Mir) [E0382]
3030
LL | | //~| ERROR use of moved value: `maybe.0` (Mir) [E0382]
3131
LL | | }
3232
| |_________^ value used here after move

src/test/ui/borrowck/issue-7573.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error: borrowed data cannot be stored outside of its closure
33
|
44
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
55
| - cannot infer an appropriate lifetime...
6-
28 | //~^ NOTE cannot infer an appropriate lifetime
6+
LL | //~^ NOTE cannot infer an appropriate lifetime
77
LL | let push_id = |installed_id: &CrateId| {
88
| ------- ------------------------ borrowed data cannot outlive this closure
99
| |

src/test/ui/borrowck/mut-borrow-in-loop.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time
33
|
44
LL | (self.func)(arg) //~ ERROR cannot borrow
55
| ^^^ mutable borrow starts here in previous iteration of loop
6-
21 | }
6+
LL | }
77
LL | }
88
| - mutable borrow ends here
99

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

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

src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure
33
|
44
LL | let y = vec![format!("World")];
55
| - captured outer variable
6-
20 | call(|| {
6+
LL | call(|| {
77
LL | y.into_iter();
88
| ^ cannot move out of captured outer variable in an `Fn` closure
99

src/test/ui/codemap_tests/tab_3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0382]: use of moved value: `some_vec`
33
|
44
LL | some_vec.into_iter();
55
| -------- value moved here
6-
16 | {
6+
LL | {
77
LL | println!("{:?}", some_vec); //~ ERROR use of moved
88
| ^^^^^^^^ value used here after move
99
|

src/test/ui/coherence-overlap-downstream-inherent.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0592]: duplicate definitions with name `dummy`
33
|
44
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
55
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
6-
18 | //~^ ERROR E0592
6+
LL | //~^ ERROR E0592
77
LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
88
| ------------------- other definition for `dummy`
99

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

0 commit comments

Comments
 (0)