@@ -254,41 +254,6 @@ pub enum TyKind<'tcx> {
254254 Error ,
255255}
256256
257- impl < ' tcx > TyKind < ' tcx > {
258- pub fn article_and_description ( & self ) -> ( & ' static str , & ' static str ) {
259- match * self {
260- Bool => ( "a" , "boolean value" ) ,
261- Char => ( "a" , "character" ) ,
262- Int ( ..) => ( "a" , "signed interger" ) ,
263- Uint ( ..) => ( "an" , "unsigned integer" ) ,
264- Float ( ..) => ( "a" , "floating point number" ) ,
265- Adt ( ..) => ( "an" , "abstract data type" ) ,
266- Foreign ( ..) => ( "a" , "foreign type" ) ,
267- Str => ( "a" , "string slice" ) ,
268- Array ( ..) => ( "an" , "array" ) ,
269- Slice ( ..) => ( "a" , "slice" ) ,
270- RawPtr ( ..) => ( "a" , "raw pointer" ) ,
271- Ref ( ..) => ( "a" , "reference" ) ,
272- FnDef ( ..) => ( "a" , "function" ) ,
273- FnPtr ( ..) => ( "a" , "function pointer" ) ,
274- Dynamic ( ..) => ( "a" , "trait object" ) ,
275- Closure ( ..) => ( "a" , "closure" ) ,
276- Generator ( ..) => ( "a" , "generator" ) ,
277- GeneratorWitness ( ..) => ( "a" , "generator witness" ) ,
278- Never => ( "a" , "never" ) ,
279- Tuple ( ..) => ( "a" , "tuple" ) ,
280- Projection ( ..) => ( "a" , "projection" ) ,
281- UnnormalizedProjection ( ..) => ( "an" , "unnormalized projection" ) ,
282- Opaque ( ..) => ( "an" , "opaque type" ) ,
283- Param ( ..) => ( "a" , "type parameter" ) ,
284- Bound ( ..) => ( "a" , "bound type variable" ) ,
285- Placeholder ( ..) => ( "a" , "universally quantified higher-ranked type" ) ,
286- Infer ( ..) => ( "an" , "inference variable" ) ,
287- Error => ( "a" , "type error" ) ,
288- }
289- }
290- }
291-
292257// `TyKind` is used a lot. Make sure it doesn't unintentionally get bigger.
293258#[ cfg( target_arch = "x86_64" ) ]
294259static_assert_size ! ( TyKind <' _>, 24 ) ;
0 commit comments