Skip to content

Commit 79afc6e

Browse files
author
Matthew Russo
committed
updates tests to use new error code
1 parent 34e7637 commit 79afc6e

39 files changed

+96
-192
lines changed

src/librustc_typeck/diagnostics.rs

+13-7
Original file line numberDiff line numberDiff line change
@@ -1042,9 +1042,10 @@ enum NightsWatch {}
10421042

10431043
E0087: r##"
10441044
#### Note: this error code is no longer emitted by the compiler.
1045+
10451046
Too many type arguments were supplied for a function. For example:
10461047
1047-
```compile_fail,E0087
1048+
```compile_fail,E0107
10481049
fn foo<T>() {}
10491050
10501051
fn main() {
@@ -1059,9 +1060,10 @@ parameters.
10591060

10601061
E0088: r##"
10611062
#### Note: this error code is no longer emitted by the compiler.
1063+
10621064
You gave too many lifetime arguments. Erroneous code example:
10631065
1064-
```compile_fail,E0088
1066+
```compile_fail,E0107
10651067
fn f() {}
10661068
10671069
fn main() {
@@ -1106,9 +1108,10 @@ fn main() {
11061108

11071109
E0089: r##"
11081110
#### Note: this error code is no longer emitted by the compiler.
1111+
11091112
Too few type arguments were supplied for a function. For example:
11101113
1111-
```compile_fail,E0089
1114+
```compile_fail,E0107
11121115
fn foo<T, U>() {}
11131116
11141117
fn main() {
@@ -1119,7 +1122,7 @@ fn main() {
11191122
Note that if a function takes multiple type arguments but you want the compiler
11201123
to infer some of them, you can use type placeholders:
11211124
1122-
```compile_fail,E0089
1125+
```compile_fail,E0107
11231126
fn foo<T, U>(x: T) {}
11241127
11251128
fn main() {
@@ -1133,9 +1136,10 @@ fn main() {
11331136

11341137
E0090: r##"
11351138
#### Note: this error code is no longer emitted by the compiler.
1139+
11361140
You gave too few lifetime arguments. Example:
11371141
1138-
```compile_fail,E0090
1142+
```compile_fail,E0107
11391143
fn foo<'a: 'b, 'b: 'a>() {}
11401144
11411145
fn main() {
@@ -2418,13 +2422,14 @@ fn baz<I>(x: &<I as Foo>::A) where I: Foo<A=Bar> {}
24182422

24192423
E0243: r##"
24202424
#### Note: this error code is no longer emitted by the compiler.
2425+
24212426
This error indicates that not enough type parameters were found in a type or
24222427
trait.
24232428
24242429
For example, the `Foo` struct below is defined to be generic in `T`, but the
24252430
type parameter is missing in the definition of `Bar`:
24262431
2427-
```compile_fail,E0243
2432+
```compile_fail,E0107
24282433
struct Foo<T> { x: T }
24292434
24302435
struct Bar { x: Foo }
@@ -2433,13 +2438,14 @@ struct Bar { x: Foo }
24332438

24342439
E0244: r##"
24352440
#### Note: this error code is no longer emitted by the compiler.
2441+
24362442
This error indicates that too many type parameters were found in a type or
24372443
trait.
24382444
24392445
For example, the `Foo` struct below has no type parameters, but is supplied
24402446
with two in the definition of `Bar`:
24412447
2442-
```compile_fail,E0244
2448+
```compile_fail,E0107
24432449
struct Foo { x: bool }
24442450
24452451
struct Bar<S, T> { x: Foo<S, T> }
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0087]: wrong number of type arguments: expected 1, found 2
1+
error[E0107]: wrong number of type arguments: expected 1, found 2
22
--> $DIR/bad-mid-path-type-params.rs:40:28
33
|
44
LL | let _ = S::new::<isize,f64>(1, 1.0);
@@ -10,19 +10,18 @@ error[E0107]: wrong number of lifetime arguments: expected 0, found 1
1010
LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
1111
| ^^ unexpected lifetime argument
1212

13-
error[E0087]: wrong number of type arguments: expected 1, found 2
13+
error[E0107]: wrong number of type arguments: expected 1, found 2
1414
--> $DIR/bad-mid-path-type-params.rs:46:36
1515
|
1616
LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
1717
| ^^^ unexpected type argument
1818

19-
error[E0088]: wrong number of lifetime arguments: expected 0, found 1
19+
error[E0107]: wrong number of lifetime arguments: expected 0, found 1
2020
--> $DIR/bad-mid-path-type-params.rs:49:25
2121
|
2222
LL | let _: S2 = Trait::<'a,isize>::new::<f64>(1, 1.0);
2323
| ^^ unexpected lifetime argument
2424

2525
error: aborting due to 4 previous errors
2626

27-
Some errors occurred: E0087, E0088, E0107.
28-
For more information about an error, try `rustc --explain E0087`.
27+
For more information about this error, try `rustc --explain E0107`.
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
error[E0090]: wrong number of lifetime arguments: expected 2, found 1
1+
error[E0107]: wrong number of lifetime arguments: expected 2, found 1
22
--> $DIR/constructor-lifetime-args.rs:27:5
33
|
44
LL | S::<'static>(&0, &0);
55
| ^^^^^^^^^^^^ expected 2 lifetime arguments
66

7-
error[E0088]: wrong number of lifetime arguments: expected 2, found 3
7+
error[E0107]: wrong number of lifetime arguments: expected 2, found 3
88
--> $DIR/constructor-lifetime-args.rs:29:27
99
|
1010
LL | S::<'static, 'static, 'static>(&0, &0);
1111
| ^^^^^^^ unexpected lifetime argument
1212

13-
error[E0090]: wrong number of lifetime arguments: expected 2, found 1
13+
error[E0107]: wrong number of lifetime arguments: expected 2, found 1
1414
--> $DIR/constructor-lifetime-args.rs:32:5
1515
|
1616
LL | E::V::<'static>(&0);
1717
| ^^^^^^^^^^^^^^^ expected 2 lifetime arguments
1818

19-
error[E0088]: wrong number of lifetime arguments: expected 2, found 3
19+
error[E0107]: wrong number of lifetime arguments: expected 2, found 3
2020
--> $DIR/constructor-lifetime-args.rs:34:30
2121
|
2222
LL | E::V::<'static, 'static, 'static>(&0);
2323
| ^^^^^^^ unexpected lifetime argument
2424

2525
error: aborting due to 4 previous errors
2626

27-
Some errors occurred: E0088, E0090.
28-
For more information about an error, try `rustc --explain E0088`.
27+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/error-codes/E0087.rs

-18
This file was deleted.

src/test/ui/error-codes/E0088.rs

-17
This file was deleted.

src/test/ui/error-codes/E0089.rs

-15
This file was deleted.

src/test/ui/error-codes/E0090.rs

-15
This file was deleted.

src/test/ui/error-codes/E0243.rs

-16
This file was deleted.

src/test/ui/error-codes/E0244.rs

-17
This file was deleted.

src/test/ui/generic/generic-arg-mismatch-recover.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0088]: wrong number of lifetime arguments: expected 1, found 2
1+
error[E0107]: wrong number of lifetime arguments: expected 1, found 2
22
--> $DIR/generic-arg-mismatch-recover.rs:16:20
33
|
44
LL | Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arguments
@@ -13,19 +13,19 @@ LL | Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arg
1313
= note: expected type `&'static ()`
1414
found type `&{integer}`
1515

16-
error[E0088]: wrong number of lifetime arguments: expected 1, found 2
16+
error[E0107]: wrong number of lifetime arguments: expected 1, found 2
1717
--> $DIR/generic-arg-mismatch-recover.rs:19:20
1818
|
1919
LL | Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments
2020
| ^^^^^^^ unexpected lifetime argument
2121

22-
error[E0087]: wrong number of type arguments: expected 0, found 1
22+
error[E0107]: wrong number of type arguments: expected 0, found 1
2323
--> $DIR/generic-arg-mismatch-recover.rs:19:29
2424
|
2525
LL | Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments
2626
| ^^ unexpected type argument
2727

2828
error: aborting due to 4 previous errors
2929

30-
Some errors occurred: E0087, E0088, E0308.
31-
For more information about an error, try `rustc --explain E0087`.
30+
Some errors occurred: E0107, E0308.
31+
For more information about an error, try `rustc --explain E0107`.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0243]: wrong number of type arguments: expected at least 2, found 1
1+
error[E0107]: wrong number of type arguments: expected at least 2, found 1
22
--> $DIR/generic-impl-less-params-with-defaults.rs:21:5
33
|
44
LL | Foo::<isize>::new();
55
| ^^^^^^^^^^^^^^^^^ expected at least 2 type arguments
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0243`.
9+
For more information about this error, try `rustc --explain E0107`.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0244]: wrong number of type arguments: expected at most 2, found 3
1+
error[E0107]: wrong number of type arguments: expected at most 2, found 3
22
--> $DIR/generic-impl-more-params-with-defaults.rs:23:5
33
|
44
LL | Vec::<isize, Heap, bool>::new();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type argument
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0244`.
9+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/generic/generic-type-less-params-with-defaults.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ struct Vec<T, A = Heap>(
1717

1818
fn main() {
1919
let _: Vec;
20-
//~^ ERROR wrong number of type arguments: expected at least 1, found 0 [E0243]
20+
//~^ ERROR wrong number of type arguments: expected at least 1, found 0 [E0107]
2121
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0243]: wrong number of type arguments: expected at least 1, found 0
1+
error[E0107]: wrong number of type arguments: expected at least 1, found 0
22
--> $DIR/generic-type-less-params-with-defaults.rs:19:12
33
|
44
LL | let _: Vec;
55
| ^^^ expected at least 1 type argument
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0243`.
9+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/generic/generic-type-more-params-with-defaults.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ struct Vec<T, A = Heap>(
1717

1818
fn main() {
1919
let _: Vec<isize, Heap, bool>;
20-
//~^ ERROR wrong number of type arguments: expected at most 2, found 3 [E0244]
20+
//~^ ERROR wrong number of type arguments: expected at most 2, found 3 [E0107]
2121
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0244]: wrong number of type arguments: expected at most 2, found 3
1+
error[E0107]: wrong number of type arguments: expected at most 2, found 3
22
--> $DIR/generic-type-more-params-with-defaults.rs:19:12
33
|
44
LL | let _: Vec<isize, Heap, bool>;
55
| ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type argument
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0244`.
9+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/issue-53251.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0087]: wrong number of type arguments: expected 0, found 1
1+
error[E0107]: wrong number of type arguments: expected 0, found 1
22
--> $DIR/issue-53251.rs:21:24
33
|
44
LL | S::f::<i64>();
@@ -9,4 +9,4 @@ LL | impl_add!(a b);
99

1010
error: aborting due to previous error
1111

12-
For more information about this error, try `rustc --explain E0087`.
12+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/issues/issue-14092.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
// except according to those terms.
1010

1111
fn fn1(0: Box) {}
12-
//~^ ERROR wrong number of type arguments: expected 1, found 0 [E0243]
12+
//~^ ERROR wrong number of type arguments: expected 1, found 0 [E0107]
1313

1414
fn main() {}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0243]: wrong number of type arguments: expected 1, found 0
1+
error[E0107]: wrong number of type arguments: expected 1, found 0
22
--> $DIR/issue-14092.rs:11:11
33
|
44
LL | fn fn1(0: Box) {}
55
| ^^^ expected 1 type argument
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0243`.
9+
For more information about this error, try `rustc --explain E0107`.

src/test/ui/issues/issue-23024.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ fn main()
1818
vfnfer.push(box h);
1919
println!("{:?}",(vfnfer[0] as Fn)(3));
2020
//~^ ERROR the precise format of `Fn`-family traits'
21-
//~| ERROR wrong number of type arguments: expected 1, found 0 [E0243]
21+
//~| ERROR wrong number of type arguments: expected 1, found 0 [E0107]
2222
//~| ERROR the value of the associated type `Output` (from the trait `std::ops::FnOnce`)
2323
}

0 commit comments

Comments
 (0)