File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2206,10 +2206,12 @@ fn clean_maybe_renamed_item<'tcx>(
2206
2206
} ;
2207
2207
2208
2208
let mut extra_attrs = Vec :: new ( ) ;
2209
- if let Some ( hir :: Node :: Item ( use_node ) ) =
2210
- import_id . and_then ( |def_id| cx. tcx . hir ( ) . find_by_def_id ( def_id ) )
2209
+ if let Some ( import_id ) = import_id &&
2210
+ let Some ( hir :: Node :: Item ( use_node ) ) = cx. tcx . hir ( ) . find_by_def_id ( import_id )
2211
2211
{
2212
- // We get all the various imports' attributes.
2212
+ // First, we add the attributes from the current import.
2213
+ extra_attrs. extend_from_slice ( inline:: load_attrs ( cx, import_id. to_def_id ( ) ) ) ;
2214
+ // Then we get all the various imports' attributes.
2213
2215
get_all_import_attributes ( use_node, cx. tcx , item. owner_id . def_id , & mut extra_attrs) ;
2214
2216
}
2215
2217
You can’t perform that action at this time.
0 commit comments