@@ -495,7 +495,10 @@ impl<'hir> Map<'hir> {
495
495
MacroKind :: Bang ) )
496
496
}
497
497
NodeGenericParam ( param) => {
498
- Some ( Def :: TyParam ( self . local_def_id ( param. id ) ) )
498
+ Some ( match param. kind {
499
+ GenericParamKind :: Lifetime { .. } => Def :: Local ( param. id ) ,
500
+ GenericParamKind :: Type { .. } => Def :: TyParam ( self . local_def_id ( param. id ) )
501
+ } )
499
502
}
500
503
}
501
504
}
@@ -975,8 +978,8 @@ impl<'hir> Map<'hir> {
975
978
Some ( NodeExpr ( ref e) ) => Some ( & * e. attrs ) ,
976
979
Some ( NodeStmt ( ref s) ) => Some ( s. node . attrs ( ) ) ,
977
980
Some ( NodeGenericParam ( param) ) => match param. kind {
981
+ GenericParamKind :: Lifetime { .. } => None ,
978
982
GenericParamKind :: Type { ref attrs, .. } => Some ( & attrs[ ..] ) ,
979
- _ => bug ! ( "unexpected non-type NodeGenericParam" )
980
983
}
981
984
// unit/tuple structs take the attributes straight from
982
985
// the struct definition.
@@ -1375,7 +1378,7 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
1375
1378
format ! ( "lifetime {}{}" , map. node_to_pretty_string( id) , id_str)
1376
1379
}
1377
1380
Some ( NodeGenericParam ( ref param) ) => {
1378
- format ! ( "genericparam {:?}{}" , param, id_str)
1381
+ format ! ( "generic_param {:?}{}" , param, id_str)
1379
1382
}
1380
1383
Some ( NodeVisibility ( ref vis) ) => {
1381
1384
format ! ( "visibility {:?}{}" , vis, id_str)
0 commit comments