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