@@ -1207,10 +1207,6 @@ impl GenericBound {
12071207crate struct Lifetime ( pub Symbol ) ;
12081208
12091209impl Lifetime {
1210- crate fn get_ref ( & self ) -> SymbolStr {
1211- self . 0 . as_str ( )
1212- }
1213-
12141210 crate fn statik ( ) -> Lifetime {
12151211 Lifetime ( kw:: StaticLifetime )
12161212 }
@@ -1248,17 +1244,6 @@ impl GenericParamDefKind {
12481244 crate fn is_type ( & self ) -> bool {
12491245 matches ! ( self , GenericParamDefKind :: Type { .. } )
12501246 }
1251-
1252- // FIXME(eddyb) this either returns the default of a type parameter, or the
1253- // type of a `const` parameter. It seems that the intention is to *visit*
1254- // any embedded types, but `get_type` seems to be the wrong name for that.
1255- crate fn get_type ( & self ) -> Option < Type > {
1256- match self {
1257- GenericParamDefKind :: Type { default, .. } => default. as_deref ( ) . cloned ( ) ,
1258- GenericParamDefKind :: Const { ty, .. } => Some ( ( & * * ty) . clone ( ) ) ,
1259- GenericParamDefKind :: Lifetime { .. } => None ,
1260- }
1261- }
12621247}
12631248
12641249#[ derive( Clone , PartialEq , Eq , Debug , Hash ) ]
@@ -1283,10 +1268,6 @@ impl GenericParamDef {
12831268 self . kind . is_type ( )
12841269 }
12851270
1286- crate fn get_type ( & self ) -> Option < Type > {
1287- self . kind . get_type ( )
1288- }
1289-
12901271 crate fn get_bounds ( & self ) -> Option < & [ GenericBound ] > {
12911272 match self . kind {
12921273 GenericParamDefKind :: Type { ref bounds, .. } => Some ( bounds) ,
0 commit comments