@@ -19,19 +19,24 @@ static TEST5: (_, _) = (1, 2);
19
19
20
20
fn test6 ( _: _ ) { }
21
21
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
22
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
22
23
23
24
fn test6_b < T > ( _: _ , _: T ) { }
24
25
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
26
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
25
27
26
28
fn test6_c < T , K , L , A , B > ( _: _ , _: ( T , K , L , A , B ) ) { }
27
29
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
30
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
28
31
29
32
fn test7 ( x : _ ) { let _x: usize = x; }
30
33
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
34
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
31
35
32
36
fn test8 ( _f : fn ( ) -> _ ) { }
33
37
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
34
38
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
39
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
35
40
36
41
struct Test9 ;
37
42
@@ -41,6 +46,7 @@ impl Test9 {
41
46
42
47
fn test10 ( & self , _x : _ ) { }
43
48
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
49
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
44
50
}
45
51
46
52
fn test11 ( x : & usize ) -> & _ {
@@ -59,12 +65,16 @@ impl Clone for Test9 {
59
65
60
66
fn clone_from ( & mut self , other : _ ) { * self = Test9 ; }
61
67
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
68
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
62
69
}
63
70
64
71
struct Test10 {
65
72
a : _ ,
66
73
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
74
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
67
75
b : ( _ , _ ) ,
76
+ //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
77
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
68
78
}
69
79
70
80
pub fn main ( ) {
@@ -92,13 +102,16 @@ pub fn main() {
92
102
93
103
fn fn_test6 ( _: _ ) { }
94
104
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
105
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
95
106
96
107
fn fn_test7 ( x : _ ) { let _x: usize = x; }
97
108
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
109
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
98
110
99
111
fn fn_test8 ( _f : fn ( ) -> _ ) { }
100
112
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
101
113
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
114
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
102
115
103
116
struct FnTest9 ;
104
117
@@ -108,6 +121,7 @@ pub fn main() {
108
121
109
122
fn fn_test10 ( & self , _x : _ ) { }
110
123
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
124
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
111
125
}
112
126
113
127
impl Clone for FnTest9 {
@@ -116,12 +130,16 @@ pub fn main() {
116
130
117
131
fn clone_from ( & mut self , other : _ ) { * self = FnTest9 ; }
118
132
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
133
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
119
134
}
120
135
121
136
struct FnTest10 {
122
137
a : _ ,
123
138
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
139
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
124
140
b : ( _ , _ ) ,
141
+ //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
142
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
125
143
}
126
144
127
145
fn fn_test11 ( _: _ ) -> ( _ , _ ) { panic ! ( ) }
@@ -138,28 +156,40 @@ pub fn main() {
138
156
trait T {
139
157
fn method_test1 ( & self , x : _ ) ;
140
158
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
159
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
141
160
fn method_test2 ( & self , x : _ ) -> _ ;
142
161
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
162
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
163
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
143
164
fn method_test3 ( & self ) -> _ ;
144
165
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
166
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
145
167
fn assoc_fn_test1 ( x : _ ) ;
146
168
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
169
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
147
170
fn assoc_fn_test2 ( x : _ ) -> _ ;
148
171
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
172
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
173
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
149
174
fn assoc_fn_test3 ( ) -> _ ;
150
175
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
176
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
151
177
}
152
178
153
179
struct BadStruct < _ > ( _ ) ;
154
180
//~^ ERROR expected identifier, found reserved identifier `_`
155
181
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
182
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
156
183
trait BadTrait < _ > { }
157
184
//~^ ERROR expected identifier, found reserved identifier `_`
158
185
impl BadTrait < _ > for BadStruct < _ > { }
159
186
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
187
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
188
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
160
189
161
190
fn impl_trait ( ) -> impl BadTrait < _ > {
162
191
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
192
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
163
193
unimplemented ! ( )
164
194
}
165
195
@@ -168,18 +198,22 @@ struct BadStruct1<_, _>(_);
168
198
//~| ERROR expected identifier, found reserved identifier `_`
169
199
//~| ERROR the name `_` is already used
170
200
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
201
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
171
202
struct BadStruct2 < _ , T > ( _ , T ) ;
172
203
//~^ ERROR expected identifier, found reserved identifier `_`
173
204
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
205
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
174
206
175
207
type X = Box < _ > ;
176
208
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
209
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
177
210
178
211
struct Struct ;
179
212
trait Trait < T > { }
180
213
impl Trait < usize > for Struct { }
181
214
type Y = impl Trait < _ > ;
182
215
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
216
+ //~| ERROR the type placeholder `_` is not allowed within types on item signatures
183
217
fn foo ( ) -> Y {
184
218
Struct
185
219
}
0 commit comments