File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1291,7 +1291,7 @@ impl HasAttrs for StmtKind {
1291
1291
fn attrs ( & self ) -> & [ Attribute ] {
1292
1292
match * self {
1293
1293
StmtKind :: Local ( ref local) => local. attrs ( ) ,
1294
- StmtKind :: Item ( .. ) => & [ ] ,
1294
+ StmtKind :: Item ( ref item ) => item . attrs ( ) ,
1295
1295
StmtKind :: Expr ( ref expr) | StmtKind :: Semi ( ref expr) => expr. attrs ( ) ,
1296
1296
StmtKind :: Mac ( ref mac) => {
1297
1297
let ( _, _, ref attrs) = * * mac;
@@ -1303,7 +1303,7 @@ impl HasAttrs for StmtKind {
1303
1303
fn map_attrs < F : FnOnce ( Vec < Attribute > ) -> Vec < Attribute > > ( self , f : F ) -> Self {
1304
1304
match self {
1305
1305
StmtKind :: Local ( local) => StmtKind :: Local ( local. map_attrs ( f) ) ,
1306
- StmtKind :: Item ( .. ) => self ,
1306
+ StmtKind :: Item ( item ) => StmtKind :: Item ( item . map_attrs ( f ) ) ,
1307
1307
StmtKind :: Expr ( expr) => StmtKind :: Expr ( expr. map_attrs ( f) ) ,
1308
1308
StmtKind :: Semi ( expr) => StmtKind :: Semi ( expr. map_attrs ( f) ) ,
1309
1309
StmtKind :: Mac ( mac) => StmtKind :: Mac ( mac. map ( |( mac, style, attrs) | {
You can’t perform that action at this time.
0 commit comments