@@ -19,24 +19,19 @@ static TEST5: (_, _) = (1, 2);
1919
2020fn test6 ( _: _ ) { }
2121//~^ 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
2322
2423fn test6_b < T > ( _: _ , _: T ) { }
2524//~^ 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
2725
2826fn test6_c < T , K , L , A , B > ( _: _ , _: ( T , K , L , A , B ) ) { }
2927//~^ 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
3128
3229fn test7 ( x : _ ) { let _x: usize = x; }
3330//~^ 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
3531
3632fn test8 ( _f : fn ( ) -> _ ) { }
3733//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
3834//~| 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
4035
4136struct Test9 ;
4237
@@ -46,7 +41,6 @@ impl Test9 {
4641
4742 fn test10 ( & self , _x : _ ) { }
4843 //~^ 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
5044}
5145
5246fn test11 ( x : & usize ) -> & _ {
@@ -65,16 +59,12 @@ impl Clone for Test9 {
6559
6660 fn clone_from ( & mut self , other : _ ) { * self = Test9 ; }
6761 //~^ 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
6962}
7063
7164struct Test10 {
7265 a : _ ,
7366 //~^ 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
7567 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
7868}
7969
8070pub fn main ( ) {
@@ -102,16 +92,13 @@ pub fn main() {
10292
10393 fn fn_test6 ( _: _ ) { }
10494 //~^ 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
10695
10796 fn fn_test7 ( x : _ ) { let _x: usize = x; }
10897 //~^ 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
11098
11199 fn fn_test8 ( _f : fn ( ) -> _ ) { }
112100 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
113101 //~| 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
115102
116103 struct FnTest9 ;
117104
@@ -121,7 +108,6 @@ pub fn main() {
121108
122109 fn fn_test10 ( & self , _x : _ ) { }
123110 //~^ 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
125111 }
126112
127113 impl Clone for FnTest9 {
@@ -130,16 +116,12 @@ pub fn main() {
130116
131117 fn clone_from ( & mut self , other : _ ) { * self = FnTest9 ; }
132118 //~^ 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
134119 }
135120
136121 struct FnTest10 {
137122 a : _ ,
138123 //~^ 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
140124 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
143125 }
144126
145127 fn fn_test11 ( _: _ ) -> ( _ , _ ) { panic ! ( ) }
@@ -156,40 +138,28 @@ pub fn main() {
156138trait T {
157139 fn method_test1 ( & self , x : _ ) ;
158140 //~^ 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
160141 fn method_test2 ( & self , x : _ ) -> _ ;
161142 //~^ 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
164143 fn method_test3 ( & self ) -> _ ;
165144 //~^ 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
167145 fn assoc_fn_test1 ( x : _ ) ;
168146 //~^ 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
170147 fn assoc_fn_test2 ( x : _ ) -> _ ;
171148 //~^ 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
174149 fn assoc_fn_test3 ( ) -> _ ;
175150 //~^ 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
177151}
178152
179153struct BadStruct < _ > ( _ ) ;
180154//~^ ERROR expected identifier, found reserved identifier `_`
181155//~| 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
183156trait BadTrait < _ > { }
184157//~^ ERROR expected identifier, found reserved identifier `_`
185158impl BadTrait < _ > for BadStruct < _ > { }
186159//~^ 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
189160
190161fn impl_trait ( ) -> impl BadTrait < _ > {
191162//~^ 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
193163 unimplemented ! ( )
194164}
195165
@@ -198,22 +168,18 @@ struct BadStruct1<_, _>(_);
198168//~| ERROR expected identifier, found reserved identifier `_`
199169//~| ERROR the name `_` is already used
200170//~| 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
202171struct BadStruct2 < _ , T > ( _ , T ) ;
203172//~^ ERROR expected identifier, found reserved identifier `_`
204173//~| 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
206174
207175type X = Box < _ > ;
208176//~^ 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
210177
211178struct Struct ;
212179trait Trait < T > { }
213180impl Trait < usize > for Struct { }
214181type Y = impl Trait < _ > ;
215182//~^ 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
217183fn foo ( ) -> Y {
218184 Struct
219185}
0 commit comments