@@ -373,6 +373,7 @@ impl<'hir> Map<'hir> {
373373 Node :: Pat ( _) |
374374 Node :: Binding ( _) |
375375 Node :: Local ( _) |
376+ Node :: Arm ( _) |
376377 Node :: Lifetime ( _) |
377378 Node :: Visibility ( _) |
378379 Node :: Block ( _) |
@@ -1000,6 +1001,7 @@ impl<'hir> Map<'hir> {
10001001 Some ( Node :: Field ( ref f) ) => Some ( & f. attrs [ ..] ) ,
10011002 Some ( Node :: Expr ( ref e) ) => Some ( & * e. attrs ) ,
10021003 Some ( Node :: Stmt ( ref s) ) => Some ( s. node . attrs ( ) ) ,
1004+ Some ( Node :: Arm ( ref a) ) => Some ( & * a. attrs ) ,
10031005 Some ( Node :: GenericParam ( param) ) => Some ( & param. attrs [ ..] ) ,
10041006 // Unit/tuple structs/variants take the attributes straight from
10051007 // the struct/variant definition.
@@ -1073,6 +1075,7 @@ impl<'hir> Map<'hir> {
10731075 Some ( Node :: TraitRef ( tr) ) => tr. path . span ,
10741076 Some ( Node :: Binding ( pat) ) => pat. span ,
10751077 Some ( Node :: Pat ( pat) ) => pat. span ,
1078+ Some ( Node :: Arm ( arm) ) => arm. span ,
10761079 Some ( Node :: Block ( block) ) => block. span ,
10771080 Some ( Node :: Ctor ( ..) ) => match self . find_by_hir_id (
10781081 self . get_parent_node_by_hir_id ( hir_id) )
@@ -1288,6 +1291,7 @@ impl<'a> print::State<'a> {
12881291 Node :: TraitRef ( a) => self . print_trait_ref ( & a) ,
12891292 Node :: Binding ( a) |
12901293 Node :: Pat ( a) => self . print_pat ( & a) ,
1294+ Node :: Arm ( a) => self . print_arm ( & a) ,
12911295 Node :: Block ( a) => {
12921296 use syntax:: print:: pprust:: PrintState ;
12931297
@@ -1417,6 +1421,9 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId, include_id: bool) -> String {
14171421 Some ( Node :: Pat ( _) ) => {
14181422 format ! ( "pat {}{}" , map. hir_to_pretty_string( id) , id_str)
14191423 }
1424+ Some ( Node :: Arm ( _) ) => {
1425+ format ! ( "arm {}{}" , map. hir_to_pretty_string( id) , id_str)
1426+ }
14201427 Some ( Node :: Block ( _) ) => {
14211428 format ! ( "block {}{}" , map. hir_to_pretty_string( id) , id_str)
14221429 }
0 commit comments