Skip to content

Commit aff175b

Browse files
committed
Update tests
1 parent 4900585 commit aff175b

33 files changed

+179
-182
lines changed

src/test/ui/enum-variant-generic-args.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ impl<T> Enum<T> {
99
Self::TSVariant(());
1010
//~^ ERROR mismatched types [E0308]
1111
Self::TSVariant::<()>(());
12-
//~^ ERROR type arguments are not allowed on this entity [E0109]
12+
//~^ ERROR type arguments are not allowed for this type [E0109]
1313
Self::<()>::TSVariant(());
14-
//~^ ERROR type arguments are not allowed on this entity [E0109]
14+
//~^ ERROR type arguments are not allowed for this type [E0109]
1515
//~^^ ERROR mismatched types [E0308]
1616
Self::<()>::TSVariant::<()>(());
17-
//~^ ERROR type arguments are not allowed on this entity [E0109]
18-
//~^^ ERROR type arguments are not allowed on this entity [E0109]
17+
//~^ ERROR type arguments are not allowed for this type [E0109]
18+
//~^^ ERROR type arguments are not allowed for this type [E0109]
1919
}
2020

2121
fn s_variant() {
2222
Self::SVariant { v: () };
2323
//~^ ERROR mismatched types [E0308]
2424
Self::SVariant::<()> { v: () };
25-
//~^ ERROR type arguments are not allowed on this entity [E0109]
25+
//~^ ERROR type arguments are not allowed for this type [E0109]
2626
//~^^ ERROR mismatched types [E0308]
2727
Self::<()>::SVariant { v: () };
28-
//~^ ERROR type arguments are not allowed on this entity [E0109]
28+
//~^ ERROR type arguments are not allowed for this type [E0109]
2929
//~^^ ERROR mismatched types [E0308]
3030
Self::<()>::SVariant::<()> { v: () };
31-
//~^ ERROR type arguments are not allowed on this entity [E0109]
32-
//~^^ ERROR type arguments are not allowed on this entity [E0109]
31+
//~^ ERROR type arguments are not allowed for this type [E0109]
32+
//~^^ ERROR type arguments are not allowed for this type [E0109]
3333
//~^^^ ERROR mismatched types [E0308]
3434
}
3535
}
@@ -38,36 +38,36 @@ fn main() {
3838
// Tuple struct variant
3939

4040
Enum::<()>::TSVariant::<()>(());
41-
//~^ ERROR type arguments are not allowed on this entity [E0109]
41+
//~^ ERROR type arguments are not allowed for this type [E0109]
4242

4343
Alias::TSVariant::<()>(());
44-
//~^ ERROR type arguments are not allowed on this entity [E0109]
44+
//~^ ERROR type arguments are not allowed for this type [E0109]
4545
Alias::<()>::TSVariant::<()>(());
46-
//~^ ERROR type arguments are not allowed on this entity [E0109]
46+
//~^ ERROR type arguments are not allowed for this type [E0109]
4747

4848
AliasFixed::TSVariant::<()>(());
49-
//~^ ERROR type arguments are not allowed on this entity [E0109]
49+
//~^ ERROR type arguments are not allowed for this type [E0109]
5050
AliasFixed::<()>::TSVariant(());
5151
//~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
5252
AliasFixed::<()>::TSVariant::<()>(());
53-
//~^ ERROR type arguments are not allowed on this entity [E0109]
53+
//~^ ERROR type arguments are not allowed for this type [E0109]
5454
//~^^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
5555

5656
// Struct variant
5757

5858
Enum::<()>::SVariant::<()> { v: () };
59-
//~^ ERROR type arguments are not allowed on this entity [E0109]
59+
//~^ ERROR type arguments are not allowed for this type [E0109]
6060

6161
Alias::SVariant::<()> { v: () };
62-
//~^ ERROR type arguments are not allowed on this entity [E0109]
62+
//~^ ERROR type arguments are not allowed for this type [E0109]
6363
Alias::<()>::SVariant::<()> { v: () };
64-
//~^ ERROR type arguments are not allowed on this entity [E0109]
64+
//~^ ERROR type arguments are not allowed for this type [E0109]
6565

6666
AliasFixed::SVariant::<()> { v: () };
67-
//~^ ERROR type arguments are not allowed on this entity [E0109]
67+
//~^ ERROR type arguments are not allowed for this type [E0109]
6868
AliasFixed::<()>::SVariant { v: () };
6969
//~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
7070
AliasFixed::<()>::SVariant::<()> { v: () };
71-
//~^ ERROR type arguments are not allowed on this entity [E0109]
71+
//~^ ERROR type arguments are not allowed for this type [E0109]
7272
//~^^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
7373
}

src/test/ui/enum-variant-generic-args.stderr

+18-18
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ LL | Self::TSVariant(());
77
= note: expected type `T`
88
found type `()`
99

10-
error[E0109]: type arguments are not allowed on this entity
10+
error[E0109]: type arguments are not allowed for this type
1111
--> $DIR/enum-variant-generic-args.rs:11:27
1212
|
1313
LL | Self::TSVariant::<()>(());
1414
| ^^ type argument not allowed
1515

16-
error[E0109]: type arguments are not allowed on this entity
16+
error[E0109]: type arguments are not allowed for this type
1717
--> $DIR/enum-variant-generic-args.rs:13:16
1818
|
1919
LL | Self::<()>::TSVariant(());
@@ -28,13 +28,13 @@ LL | Self::<()>::TSVariant(());
2828
= note: expected type `T`
2929
found type `()`
3030

31-
error[E0109]: type arguments are not allowed on this entity
31+
error[E0109]: type arguments are not allowed for this type
3232
--> $DIR/enum-variant-generic-args.rs:16:16
3333
|
3434
LL | Self::<()>::TSVariant::<()>(());
3535
| ^^ type argument not allowed
3636

37-
error[E0109]: type arguments are not allowed on this entity
37+
error[E0109]: type arguments are not allowed for this type
3838
--> $DIR/enum-variant-generic-args.rs:16:33
3939
|
4040
LL | Self::<()>::TSVariant::<()>(());
@@ -49,7 +49,7 @@ LL | Self::SVariant { v: () };
4949
= note: expected type `T`
5050
found type `()`
5151

52-
error[E0109]: type arguments are not allowed on this entity
52+
error[E0109]: type arguments are not allowed for this type
5353
--> $DIR/enum-variant-generic-args.rs:24:26
5454
|
5555
LL | Self::SVariant::<()> { v: () };
@@ -64,7 +64,7 @@ LL | Self::SVariant::<()> { v: () };
6464
= note: expected type `T`
6565
found type `()`
6666

67-
error[E0109]: type arguments are not allowed on this entity
67+
error[E0109]: type arguments are not allowed for this type
6868
--> $DIR/enum-variant-generic-args.rs:27:16
6969
|
7070
LL | Self::<()>::SVariant { v: () };
@@ -79,13 +79,13 @@ LL | Self::<()>::SVariant { v: () };
7979
= note: expected type `T`
8080
found type `()`
8181

82-
error[E0109]: type arguments are not allowed on this entity
82+
error[E0109]: type arguments are not allowed for this type
8383
--> $DIR/enum-variant-generic-args.rs:30:16
8484
|
8585
LL | Self::<()>::SVariant::<()> { v: () };
8686
| ^^ type argument not allowed
8787

88-
error[E0109]: type arguments are not allowed on this entity
88+
error[E0109]: type arguments are not allowed for this type
8989
--> $DIR/enum-variant-generic-args.rs:30:32
9090
|
9191
LL | Self::<()>::SVariant::<()> { v: () };
@@ -100,25 +100,25 @@ LL | Self::<()>::SVariant::<()> { v: () };
100100
= note: expected type `T`
101101
found type `()`
102102

103-
error[E0109]: type arguments are not allowed on this entity
103+
error[E0109]: type arguments are not allowed for this type
104104
--> $DIR/enum-variant-generic-args.rs:40:29
105105
|
106106
LL | Enum::<()>::TSVariant::<()>(());
107107
| ^^ type argument not allowed
108108

109-
error[E0109]: type arguments are not allowed on this entity
109+
error[E0109]: type arguments are not allowed for this type
110110
--> $DIR/enum-variant-generic-args.rs:43:24
111111
|
112112
LL | Alias::TSVariant::<()>(());
113113
| ^^ type argument not allowed
114114

115-
error[E0109]: type arguments are not allowed on this entity
115+
error[E0109]: type arguments are not allowed for this type
116116
--> $DIR/enum-variant-generic-args.rs:45:30
117117
|
118118
LL | Alias::<()>::TSVariant::<()>(());
119119
| ^^ type argument not allowed
120120

121-
error[E0109]: type arguments are not allowed on this entity
121+
error[E0109]: type arguments are not allowed for this type
122122
--> $DIR/enum-variant-generic-args.rs:48:29
123123
|
124124
LL | AliasFixed::TSVariant::<()>(());
@@ -136,31 +136,31 @@ error[E0107]: wrong number of type arguments: expected 0, found 1
136136
LL | AliasFixed::<()>::TSVariant::<()>(());
137137
| ^^ unexpected type argument
138138

139-
error[E0109]: type arguments are not allowed on this entity
139+
error[E0109]: type arguments are not allowed for this type
140140
--> $DIR/enum-variant-generic-args.rs:52:35
141141
|
142142
LL | AliasFixed::<()>::TSVariant::<()>(());
143143
| ^^ type argument not allowed
144144

145-
error[E0109]: type arguments are not allowed on this entity
145+
error[E0109]: type arguments are not allowed for this type
146146
--> $DIR/enum-variant-generic-args.rs:58:28
147147
|
148148
LL | Enum::<()>::SVariant::<()> { v: () };
149149
| ^^ type argument not allowed
150150

151-
error[E0109]: type arguments are not allowed on this entity
151+
error[E0109]: type arguments are not allowed for this type
152152
--> $DIR/enum-variant-generic-args.rs:61:23
153153
|
154154
LL | Alias::SVariant::<()> { v: () };
155155
| ^^ type argument not allowed
156156

157-
error[E0109]: type arguments are not allowed on this entity
157+
error[E0109]: type arguments are not allowed for this type
158158
--> $DIR/enum-variant-generic-args.rs:63:29
159159
|
160160
LL | Alias::<()>::SVariant::<()> { v: () };
161161
| ^^ type argument not allowed
162162

163-
error[E0109]: type arguments are not allowed on this entity
163+
error[E0109]: type arguments are not allowed for this type
164164
--> $DIR/enum-variant-generic-args.rs:66:28
165165
|
166166
LL | AliasFixed::SVariant::<()> { v: () };
@@ -178,7 +178,7 @@ error[E0107]: wrong number of type arguments: expected 0, found 1
178178
LL | AliasFixed::<()>::SVariant::<()> { v: () };
179179
| ^^ unexpected type argument
180180

181-
error[E0109]: type arguments are not allowed on this entity
181+
error[E0109]: type arguments are not allowed for this type
182182
--> $DIR/enum-variant-generic-args.rs:70:34
183183
|
184184
LL | AliasFixed::<()>::SVariant::<()> { v: () };

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0109]: type arguments are not allowed on this entity
1+
error[E0109]: type arguments are not allowed for this type
22
--> $DIR/E0109.rs:1:14
33
|
44
LL | type X = u32<i32>;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
type X = u32<'static>; //~ ERROR E0110
1+
type X = u32<'static>; //~ ERROR E0109
22

33
fn main() {}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0110]: lifetime arguments are not allowed on this entity
1+
error[E0109]: lifetime arguments are not allowed for this type
22
--> $DIR/E0110.rs:1:14
33
|
44
LL | type X = u32<'static>;
55
| ^^^^^^^ lifetime argument not allowed
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0110`.
9+
For more information about this error, try `rustc --explain E0109`.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn is_copy<T: ::std::marker<i32>::Copy>() {}
2-
//~^ ERROR type arguments are not allowed on this entity [E0109]
2+
//~^ ERROR type arguments are not allowed for this type [E0109]
33
fn main() {}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0109]: type arguments are not allowed on this entity
1+
error[E0109]: type arguments are not allowed for this type
22
--> $DIR/issue-22706.rs:1:29
33
|
44
LL | fn is_copy<T: ::std::marker<i32>::Copy>() {}

src/test/ui/mod-subitem-as-enum-variant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ mod Mod {
66
fn main() {
77
Mod::FakeVariant::<i32>(0);
88
Mod::<i32>::FakeVariant(0);
9-
//~^ ERROR type arguments are not allowed on this entity [E0109]
9+
//~^ ERROR type arguments are not allowed for this type [E0109]
1010
}

src/test/ui/mod-subitem-as-enum-variant.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0109]: type arguments are not allowed on this entity
1+
error[E0109]: type arguments are not allowed for this type
22
--> $DIR/mod-subitem-as-enum-variant.rs:8:11
33
|
44
LL | Mod::<i32>::FakeVariant(0);

src/test/ui/prim-with-args.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
fn main() {
22

3-
let x: isize<isize>; //~ ERROR type arguments are not allowed on this entity
4-
let x: i8<isize>; //~ ERROR type arguments are not allowed on this entity
5-
let x: i16<isize>; //~ ERROR type arguments are not allowed on this entity
6-
let x: i32<isize>; //~ ERROR type arguments are not allowed on this entity
7-
let x: i64<isize>; //~ ERROR type arguments are not allowed on this entity
8-
let x: usize<isize>; //~ ERROR type arguments are not allowed on this entity
9-
let x: u8<isize>; //~ ERROR type arguments are not allowed on this entity
10-
let x: u16<isize>; //~ ERROR type arguments are not allowed on this entity
11-
let x: u32<isize>; //~ ERROR type arguments are not allowed on this entity
12-
let x: u64<isize>; //~ ERROR type arguments are not allowed on this entity
13-
let x: char<isize>; //~ ERROR type arguments are not allowed on this entity
3+
let x: isize<isize>; //~ ERROR type arguments are not allowed for this type
4+
let x: i8<isize>; //~ ERROR type arguments are not allowed for this type
5+
let x: i16<isize>; //~ ERROR type arguments are not allowed for this type
6+
let x: i32<isize>; //~ ERROR type arguments are not allowed for this type
7+
let x: i64<isize>; //~ ERROR type arguments are not allowed for this type
8+
let x: usize<isize>; //~ ERROR type arguments are not allowed for this type
9+
let x: u8<isize>; //~ ERROR type arguments are not allowed for this type
10+
let x: u16<isize>; //~ ERROR type arguments are not allowed for this type
11+
let x: u32<isize>; //~ ERROR type arguments are not allowed for this type
12+
let x: u64<isize>; //~ ERROR type arguments are not allowed for this type
13+
let x: char<isize>; //~ ERROR type arguments are not allowed for this type
1414

15-
let x: isize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
16-
let x: i8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
17-
let x: i16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
18-
let x: i32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
19-
let x: i64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
20-
let x: usize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
21-
let x: u8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
22-
let x: u16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
23-
let x: u32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
24-
let x: u64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
25-
let x: char<'static>; //~ ERROR lifetime arguments are not allowed on this entity
15+
let x: isize<'static>; //~ ERROR lifetime arguments are not allowed for this type
16+
let x: i8<'static>; //~ ERROR lifetime arguments are not allowed for this type
17+
let x: i16<'static>; //~ ERROR lifetime arguments are not allowed for this type
18+
let x: i32<'static>; //~ ERROR lifetime arguments are not allowed for this type
19+
let x: i64<'static>; //~ ERROR lifetime arguments are not allowed for this type
20+
let x: usize<'static>; //~ ERROR lifetime arguments are not allowed for this type
21+
let x: u8<'static>; //~ ERROR lifetime arguments are not allowed for this type
22+
let x: u16<'static>; //~ ERROR lifetime arguments are not allowed for this type
23+
let x: u32<'static>; //~ ERROR lifetime arguments are not allowed for this type
24+
let x: u64<'static>; //~ ERROR lifetime arguments are not allowed for this type
25+
let x: char<'static>; //~ ERROR lifetime arguments are not allowed for this type
2626

2727
}

0 commit comments

Comments
 (0)