@@ -854,22 +854,22 @@ impl<'hir> Map<'hir> {
854
854
/// corresponding to the node-ID.
855
855
pub fn attrs ( & self , id : HirId ) -> & ' hir [ ast:: Attribute ] {
856
856
self . find_entry ( id) . map_or ( & [ ] , |entry| match entry. node {
857
- Node :: Param ( a) => & a. attrs [ .. ] ,
857
+ Node :: Param ( a) => a. attrs ,
858
858
Node :: Local ( l) => & l. attrs [ ..] ,
859
- Node :: Item ( i) => & i. attrs [ .. ] ,
860
- Node :: ForeignItem ( fi) => & fi. attrs [ .. ] ,
861
- Node :: TraitItem ( ref ti) => & ti. attrs [ .. ] ,
862
- Node :: ImplItem ( ref ii) => & ii. attrs [ .. ] ,
863
- Node :: Variant ( ref v) => & v. attrs [ .. ] ,
864
- Node :: Field ( ref f) => & f. attrs [ .. ] ,
859
+ Node :: Item ( i) => i. attrs ,
860
+ Node :: ForeignItem ( fi) => fi. attrs ,
861
+ Node :: TraitItem ( ref ti) => ti. attrs ,
862
+ Node :: ImplItem ( ref ii) => ii. attrs ,
863
+ Node :: Variant ( ref v) => v. attrs ,
864
+ Node :: Field ( ref f) => f. attrs ,
865
865
Node :: Expr ( ref e) => & * e. attrs ,
866
866
Node :: Stmt ( ref s) => s. kind . attrs ( |id| self . item ( id. id ) ) ,
867
867
Node :: Arm ( ref a) => & * a. attrs ,
868
- Node :: GenericParam ( param) => & param. attrs [ .. ] ,
868
+ Node :: GenericParam ( param) => param. attrs ,
869
869
// Unit/tuple structs/variants take the attributes straight from
870
870
// the struct/variant definition.
871
871
Node :: Ctor ( ..) => self . attrs ( self . get_parent_item ( id) ) ,
872
- Node :: Crate ( item) => & item. attrs [ .. ] ,
872
+ Node :: Crate ( item) => item. attrs ,
873
873
Node :: MacroDef ( def) => def. attrs ,
874
874
Node :: AnonConst ( ..)
875
875
| Node :: PathSegment ( ..)
0 commit comments