Skip to content

Commit d2185a2

Browse files
committed
Update ui tests
1 parent 8676a21 commit d2185a2

31 files changed

+98
-98
lines changed

src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
2-
--> $DIR/two-phase-activation-sharing-interference.rs:32:15
2+
--> $DIR/two-phase-activation-sharing-interference.rs:30:15
33
|
44
LL | let y = &mut x;
55
| ------ mutable borrow occurs here
@@ -10,7 +10,7 @@ LL | *y += 1;
1010
| ------- mutable borrow later used here
1111

1212
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
13-
--> $DIR/two-phase-activation-sharing-interference.rs:40:13
13+
--> $DIR/two-phase-activation-sharing-interference.rs:38:13
1414
|
1515
LL | let y = &mut x;
1616
| ------ mutable borrow occurs here
@@ -21,7 +21,7 @@ LL | *y += 1;
2121
| ------- mutable borrow later used here
2222

2323
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
24-
--> $DIR/two-phase-activation-sharing-interference.rs:51:13
24+
--> $DIR/two-phase-activation-sharing-interference.rs:49:13
2525
|
2626
LL | let y = &mut x;
2727
| ------ mutable borrow occurs here
@@ -32,7 +32,7 @@ LL | *y += 1;
3232
| ------- mutable borrow later used here
3333

3434
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
35-
--> $DIR/two-phase-activation-sharing-interference.rs:62:14
35+
--> $DIR/two-phase-activation-sharing-interference.rs:60:14
3636
|
3737
LL | let y = &mut x;
3838
| ------ mutable borrow occurs here

src/test/ui/consts/const-array-oob.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0080]: evaluation of constant value failed
2-
--> $DIR/const-array-oob.rs:8:19
2+
--> $DIR/const-array-oob.rs:6:19
33
|
44
LL | const BLUB: [u32; FOO[4]] = [5, 6];
55
| ^^^^^^ index out of bounds: the len is 3 but the index is 4

src/test/ui/deprecation/deprecation-in-future.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: use of deprecated item 'deprecated_future': text
2-
--> $DIR/deprecation-in-future.rs:11:5
2+
--> $DIR/deprecation-in-future.rs:9:5
33
|
44
LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated
55
| ^^^^^^^^^^^^^^^^^

src/test/ui/derives/deriving-meta-unknown-trait.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: cannot find derive macro `Eqr` in this scope
2-
--> $DIR/deriving-meta-unknown-trait.rs:3:10
2+
--> $DIR/deriving-meta-unknown-trait.rs:1:10
33
|
44
LL | #[derive(Eqr)]
55
| ^^^ help: try: `Eq`

src/test/ui/discrim/discrim-overflow-2.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
error[E0370]: enum discriminant overflowed
2-
--> $DIR/discrim-overflow-2.rs:17:9
2+
--> $DIR/discrim-overflow-2.rs:15:9
33
|
44
LL | OhNo,
55
| ^^^^ overflowed on value after 127
66
|
77
= note: explicitly set `OhNo = -128` if that is desired outcome
88

99
error[E0370]: enum discriminant overflowed
10-
--> $DIR/discrim-overflow-2.rs:26:9
10+
--> $DIR/discrim-overflow-2.rs:24:9
1111
|
1212
LL | OhNo,
1313
| ^^^^ overflowed on value after 255
1414
|
1515
= note: explicitly set `OhNo = 0` if that is desired outcome
1616

1717
error[E0370]: enum discriminant overflowed
18-
--> $DIR/discrim-overflow-2.rs:35:9
18+
--> $DIR/discrim-overflow-2.rs:33:9
1919
|
2020
LL | OhNo,
2121
| ^^^^ overflowed on value after 32767
2222
|
2323
= note: explicitly set `OhNo = -32768` if that is desired outcome
2424

2525
error[E0370]: enum discriminant overflowed
26-
--> $DIR/discrim-overflow-2.rs:44:9
26+
--> $DIR/discrim-overflow-2.rs:42:9
2727
|
2828
LL | OhNo,
2929
| ^^^^ overflowed on value after 65535
3030
|
3131
= note: explicitly set `OhNo = 0` if that is desired outcome
3232

3333
error[E0370]: enum discriminant overflowed
34-
--> $DIR/discrim-overflow-2.rs:53:9
34+
--> $DIR/discrim-overflow-2.rs:51:9
3535
|
3636
LL | OhNo,
3737
| ^^^^ overflowed on value after 2147483647
3838
|
3939
= note: explicitly set `OhNo = -2147483648` if that is desired outcome
4040

4141
error[E0370]: enum discriminant overflowed
42-
--> $DIR/discrim-overflow-2.rs:62:9
42+
--> $DIR/discrim-overflow-2.rs:60:9
4343
|
4444
LL | OhNo,
4545
| ^^^^ overflowed on value after 4294967295
4646
|
4747
= note: explicitly set `OhNo = 0` if that is desired outcome
4848

4949
error[E0370]: enum discriminant overflowed
50-
--> $DIR/discrim-overflow-2.rs:71:9
50+
--> $DIR/discrim-overflow-2.rs:69:9
5151
|
5252
LL | OhNo,
5353
| ^^^^ overflowed on value after 9223372036854775807
5454
|
5555
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome
5656

5757
error[E0370]: enum discriminant overflowed
58-
--> $DIR/discrim-overflow-2.rs:80:9
58+
--> $DIR/discrim-overflow-2.rs:78:9
5959
|
6060
LL | OhNo,
6161
| ^^^^ overflowed on value after 18446744073709551615

src/test/ui/discrim/discrim-overflow.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
error[E0370]: enum discriminant overflowed
2-
--> $DIR/discrim-overflow.rs:15:9
2+
--> $DIR/discrim-overflow.rs:13:9
33
|
44
LL | OhNo,
55
| ^^^^ overflowed on value after 127
66
|
77
= note: explicitly set `OhNo = -128` if that is desired outcome
88

99
error[E0370]: enum discriminant overflowed
10-
--> $DIR/discrim-overflow.rs:26:9
10+
--> $DIR/discrim-overflow.rs:24:9
1111
|
1212
LL | OhNo,
1313
| ^^^^ overflowed on value after 255
1414
|
1515
= note: explicitly set `OhNo = 0` if that is desired outcome
1616

1717
error[E0370]: enum discriminant overflowed
18-
--> $DIR/discrim-overflow.rs:37:9
18+
--> $DIR/discrim-overflow.rs:35:9
1919
|
2020
LL | OhNo,
2121
| ^^^^ overflowed on value after 32767
2222
|
2323
= note: explicitly set `OhNo = -32768` if that is desired outcome
2424

2525
error[E0370]: enum discriminant overflowed
26-
--> $DIR/discrim-overflow.rs:48:9
26+
--> $DIR/discrim-overflow.rs:46:9
2727
|
2828
LL | OhNo,
2929
| ^^^^ overflowed on value after 65535
3030
|
3131
= note: explicitly set `OhNo = 0` if that is desired outcome
3232

3333
error[E0370]: enum discriminant overflowed
34-
--> $DIR/discrim-overflow.rs:60:9
34+
--> $DIR/discrim-overflow.rs:58:9
3535
|
3636
LL | OhNo,
3737
| ^^^^ overflowed on value after 2147483647
3838
|
3939
= note: explicitly set `OhNo = -2147483648` if that is desired outcome
4040

4141
error[E0370]: enum discriminant overflowed
42-
--> $DIR/discrim-overflow.rs:72:9
42+
--> $DIR/discrim-overflow.rs:70:9
4343
|
4444
LL | OhNo,
4545
| ^^^^ overflowed on value after 4294967295
4646
|
4747
= note: explicitly set `OhNo = 0` if that is desired outcome
4848

4949
error[E0370]: enum discriminant overflowed
50-
--> $DIR/discrim-overflow.rs:84:9
50+
--> $DIR/discrim-overflow.rs:82:9
5151
|
5252
LL | OhNo,
5353
| ^^^^ overflowed on value after 9223372036854775807
5454
|
5555
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome
5656

5757
error[E0370]: enum discriminant overflowed
58-
--> $DIR/discrim-overflow.rs:96:9
58+
--> $DIR/discrim-overflow.rs:94:9
5959
|
6060
LL | OhNo,
6161
| ^^^^ overflowed on value after 18446744073709551615

src/test/ui/editions/edition-raw-pointer-method-2015.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: type annotations needed
2-
--> $DIR/edition-raw-pointer-method-2015.rs:10:15
2+
--> $DIR/edition-raw-pointer-method-2015.rs:9:15
33
|
44
LL | let _ = y.is_null();
55
| ^^^^^^^
66
|
77
note: lint level defined here
8-
--> $DIR/edition-raw-pointer-method-2015.rs:6:8
8+
--> $DIR/edition-raw-pointer-method-2015.rs:5:8
99
|
1010
LL | #[deny(warnings)]
1111
| ^^^^^^^^

src/test/ui/editions/edition-raw-pointer-method-2018.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0699]: the type of this value must be known to call a method on a raw pointer on it
2-
--> $DIR/edition-raw-pointer-method-2018.rs:10:15
2+
--> $DIR/edition-raw-pointer-method-2018.rs:9:15
33
|
44
LL | let _ = y.is_null();
55
| ^^^^^^^

src/test/ui/error-codes/E0375.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
2-
--> $DIR/E0375.rs:12:12
2+
--> $DIR/E0375.rs:10:12
33
|
44
LL | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions

src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature
2-
--> $DIR/feature-gate-ffi_returns_twice.rs:5:5
2+
--> $DIR/feature-gate-ffi_returns_twice.rs:4:5
33
|
44
LL | #[ffi_returns_twice]
55
| ^^^^^^^^^^^^^^^^^^^^

src/test/ui/ffi_returns_twice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions
2-
--> $DIR/ffi_returns_twice.rs:5:1
2+
--> $DIR/ffi_returns_twice.rs:4:1
33
|
44
LL | #[ffi_returns_twice]
55
| ^^^^^^^^^^^^^^^^^^^^

src/test/ui/impl-trait/auto-trait-leak.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
2-
--> $DIR/auto-trait-leak.rs:14:16
2+
--> $DIR/auto-trait-leak.rs:12:16
33
|
44
LL | fn cycle1() -> impl Clone {
55
| ^^^^^^^^^^
66
|
77
note: ...which requires processing `cycle1`...
8-
--> $DIR/auto-trait-leak.rs:14:1
8+
--> $DIR/auto-trait-leak.rs:12:1
99
|
1010
LL | fn cycle1() -> impl Clone {
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
1313
note: ...which requires processing `cycle2::{{opaque}}#0`...
14-
--> $DIR/auto-trait-leak.rs:23:16
14+
--> $DIR/auto-trait-leak.rs:21:16
1515
|
1616
LL | fn cycle2() -> impl Clone {
1717
| ^^^^^^^^^^
1818
note: ...which requires processing `cycle2`...
19-
--> $DIR/auto-trait-leak.rs:23:1
19+
--> $DIR/auto-trait-leak.rs:21:1
2020
|
2121
LL | fn cycle2() -> impl Clone {
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2323
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
2424
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
2525
note: cycle used when checking item types in top-level module
26-
--> $DIR/auto-trait-leak.rs:3:1
26+
--> $DIR/auto-trait-leak.rs:1:1
2727
|
2828
LL | / use std::cell::Cell;
2929
LL | | use std::rc::Rc;
@@ -35,30 +35,30 @@ LL | | }
3535
| |_^
3636

3737
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
38-
--> $DIR/auto-trait-leak.rs:14:16
38+
--> $DIR/auto-trait-leak.rs:12:16
3939
|
4040
LL | fn cycle1() -> impl Clone {
4141
| ^^^^^^^^^^
4242
|
4343
note: ...which requires processing `cycle1`...
44-
--> $DIR/auto-trait-leak.rs:14:1
44+
--> $DIR/auto-trait-leak.rs:12:1
4545
|
4646
LL | fn cycle1() -> impl Clone {
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^
4848
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
4949
note: ...which requires processing `cycle2::{{opaque}}#0`...
50-
--> $DIR/auto-trait-leak.rs:23:16
50+
--> $DIR/auto-trait-leak.rs:21:16
5151
|
5252
LL | fn cycle2() -> impl Clone {
5353
| ^^^^^^^^^^
5454
note: ...which requires processing `cycle2`...
55-
--> $DIR/auto-trait-leak.rs:23:1
55+
--> $DIR/auto-trait-leak.rs:21:1
5656
|
5757
LL | fn cycle2() -> impl Clone {
5858
| ^^^^^^^^^^^^^^^^^^^^^^^^^
5959
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
6060
note: cycle used when checking item types in top-level module
61-
--> $DIR/auto-trait-leak.rs:3:1
61+
--> $DIR/auto-trait-leak.rs:1:1
6262
|
6363
LL | / use std::cell::Cell;
6464
LL | | use std::rc::Rc;
@@ -70,15 +70,15 @@ LL | | }
7070
| |_^
7171

7272
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
73-
--> $DIR/auto-trait-leak.rs:17:5
73+
--> $DIR/auto-trait-leak.rs:15:5
7474
|
7575
LL | send(cycle2().clone());
7676
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
7777
|
7878
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
7979
= note: required because it appears within the type `impl std::clone::Clone`
8080
note: required by `send`
81-
--> $DIR/auto-trait-leak.rs:6:1
81+
--> $DIR/auto-trait-leak.rs:4:1
8282
|
8383
LL | fn send<T: Send>(_: T) {}
8484
| ^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/impl-trait/auto-trait-leak2.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
2-
--> $DIR/auto-trait-leak2.rs:15:5
2+
--> $DIR/auto-trait-leak2.rs:13:5
33
|
44
LL | send(before());
55
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
66
|
77
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
8-
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:9:5: 9:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
8+
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
99
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
1010
note: required by `send`
11-
--> $DIR/auto-trait-leak2.rs:12:1
11+
--> $DIR/auto-trait-leak2.rs:10:1
1212
|
1313
LL | fn send<T: Send>(_: T) {}
1414
| ^^^^^^^^^^^^^^^^^^^^^^
1515

1616
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
17-
--> $DIR/auto-trait-leak2.rs:18:5
17+
--> $DIR/auto-trait-leak2.rs:16:5
1818
|
1919
LL | send(after());
2020
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
2121
|
2222
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
23-
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:26:5: 26:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
23+
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
2424
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
2525
note: required by `send`
26-
--> $DIR/auto-trait-leak2.rs:12:1
26+
--> $DIR/auto-trait-leak2.rs:10:1
2727
|
2828
LL | fn send<T: Send>(_: T) {}
2929
| ^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/impl-trait/method-suggestion-no-duplication.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0599]: no method named `is_empty` found for type `Foo` in the current scope
2-
--> $DIR/method-suggestion-no-duplication.rs:9:15
2+
--> $DIR/method-suggestion-no-duplication.rs:7:15
33
|
44
LL | struct Foo;
55
| ----------- method `is_empty` not found for this

src/test/ui/issues/issue-21950.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0393]: the type parameter `Rhs` must be explicitly specified
2-
--> $DIR/issue-21950.rs:7:14
2+
--> $DIR/issue-21950.rs:5:14
33
|
44
LL | &Add;
55
| ^^^ missing reference to `Rhs`
66
|
77
= note: because of the default `Self` reference, type parameters must be specified on object types
88

99
error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified
10-
--> $DIR/issue-21950.rs:7:14
10+
--> $DIR/issue-21950.rs:5:14
1111
|
1212
LL | &Add;
1313
| ^^^ associated type `Output` must be specified

src/test/ui/issues/issue-22370.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0393]: the type parameter `T` must be explicitly specified
2-
--> $DIR/issue-22370.rs:5:10
2+
--> $DIR/issue-22370.rs:3:10
33
|
44
LL | fn f(a: &A) {}
55
| ^ missing reference to `T`

0 commit comments

Comments
 (0)