@@ -1207,10 +1207,6 @@ impl GenericBound {
1207
1207
crate struct Lifetime ( pub Symbol ) ;
1208
1208
1209
1209
impl Lifetime {
1210
- crate fn get_ref ( & self ) -> SymbolStr {
1211
- self . 0 . as_str ( )
1212
- }
1213
-
1214
1210
crate fn statik ( ) -> Lifetime {
1215
1211
Lifetime ( kw:: StaticLifetime )
1216
1212
}
@@ -1248,17 +1244,6 @@ impl GenericParamDefKind {
1248
1244
crate fn is_type ( & self ) -> bool {
1249
1245
matches ! ( self , GenericParamDefKind :: Type { .. } )
1250
1246
}
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
- }
1262
1247
}
1263
1248
1264
1249
#[ derive( Clone , PartialEq , Eq , Debug , Hash ) ]
@@ -1283,10 +1268,6 @@ impl GenericParamDef {
1283
1268
self . kind . is_type ( )
1284
1269
}
1285
1270
1286
- crate fn get_type ( & self ) -> Option < Type > {
1287
- self . kind . get_type ( )
1288
- }
1289
-
1290
1271
crate fn get_bounds ( & self ) -> Option < & [ GenericBound ] > {
1291
1272
match self . kind {
1292
1273
GenericParamDefKind :: Type { ref bounds, .. } => Some ( bounds) ,
0 commit comments