@@ -133,12 +133,8 @@ fn generate_item_with_correct_attrs(
133133 let def_id = local_def_id. to_def_id ( ) ;
134134 let target_attrs = inline:: load_attrs ( cx, def_id) ;
135135 let attrs = if let Some ( import_id) = import_id {
136- let is_inline = inline:: load_attrs ( cx, import_id. to_def_id ( ) )
137- . lists ( sym:: doc)
138- . get_word_attr ( sym:: inline)
139- . is_some ( ) ;
140- let mut attrs = get_all_import_attributes ( cx, import_id, local_def_id, is_inline) ;
141- add_without_unwanted_attributes ( & mut attrs, target_attrs, is_inline, None ) ;
136+ let mut attrs = get_all_import_attributes ( cx, import_id, local_def_id) ;
137+ add_without_unwanted_attributes ( & mut attrs, target_attrs, None ) ;
142138 attrs
143139 } else {
144140 // We only keep the item's attributes.
@@ -2170,7 +2166,6 @@ fn get_all_import_attributes<'hir>(
21702166 cx : & mut DocContext < ' hir > ,
21712167 import_def_id : LocalDefId ,
21722168 target_def_id : LocalDefId ,
2173- is_inline : bool ,
21742169) -> Vec < ( Cow < ' hir , ast:: Attribute > , Option < DefId > ) > {
21752170 let mut attrs = Vec :: new ( ) ;
21762171 let mut first = true ;
@@ -2184,7 +2179,7 @@ fn get_all_import_attributes<'hir>(
21842179 attrs = import_attrs. iter ( ) . map ( |attr| ( Cow :: Borrowed ( attr) , Some ( def_id) ) ) . collect ( ) ;
21852180 first = false ;
21862181 } else {
2187- add_without_unwanted_attributes ( & mut attrs, import_attrs, is_inline , Some ( def_id) ) ;
2182+ add_without_unwanted_attributes ( & mut attrs, import_attrs, Some ( def_id) ) ;
21882183 }
21892184 }
21902185 attrs
@@ -2584,7 +2579,8 @@ fn clean_use_statement_inner<'tcx>(
25842579 } else {
25852580 if inline_attr. is_none ( )
25862581 && let Res :: Def ( DefKind :: Mod , did) = path. res
2587- && !did. is_local ( ) && did. is_crate_root ( )
2582+ && !did. is_local ( )
2583+ && did. is_crate_root ( )
25882584 {
25892585 // if we're `pub use`ing an extern crate root, don't inline it unless we
25902586 // were specifically asked for it
0 commit comments