@@ -802,34 +802,6 @@ impl<'tcx> fmt::Display for ty::TraitRef<'tcx> {
802802 }
803803}
804804
805- impl < ' tcx > ty:: TypeVariants < ' tcx > {
806- pub fn descr ( & self ) -> & ' static str {
807- match * self {
808- TyInt ( ..) | TyUint ( ..) | TyFloat ( ..) |
809- TyBool | TyChar | TyStr => "builtin type" ,
810- TyRawPtr ( ..) => "pointer" ,
811- TyRef ( ..) => "reference" ,
812- TyTuple ( ..) => "tuple" ,
813- TyFnDef ( ..) => "function type" ,
814- TyFnPtr ( ..) => "function pointer" ,
815- TyArray ( ..) => "array" ,
816- TySlice ( ..) => "slice" ,
817- TyParam ( ..) => "type parameter" ,
818- TyProjection ( ..) => "associated type" ,
819- TyTrait ( ..) => "trait type" ,
820- TyClosure ( ..) => "closure type" ,
821- TyBox ( ..) => "struct" ,
822- TyAdt ( def, ..) => match def. adt_kind ( ) {
823- ty:: AdtKind :: Struct => "struct" ,
824- ty:: AdtKind :: Union => "union" ,
825- ty:: AdtKind :: Enum => "enum" ,
826- } ,
827- TyInfer ( ..) | TyAnon ( ..) |
828- TyNever | TyError => "type" ,
829- }
830- }
831- }
832-
833805impl < ' tcx > fmt:: Display for ty:: TypeVariants < ' tcx > {
834806 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
835807 match * self {
0 commit comments