@@ -133,12 +133,8 @@ fn generate_item_with_correct_attrs(
133
133
let def_id = local_def_id. to_def_id ( ) ;
134
134
let target_attrs = inline:: load_attrs ( cx, def_id) ;
135
135
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 ) ;
142
138
attrs
143
139
} else {
144
140
// We only keep the item's attributes.
@@ -2170,7 +2166,6 @@ fn get_all_import_attributes<'hir>(
2170
2166
cx : & mut DocContext < ' hir > ,
2171
2167
import_def_id : LocalDefId ,
2172
2168
target_def_id : LocalDefId ,
2173
- is_inline : bool ,
2174
2169
) -> Vec < ( Cow < ' hir , ast:: Attribute > , Option < DefId > ) > {
2175
2170
let mut attrs = Vec :: new ( ) ;
2176
2171
let mut first = true ;
@@ -2184,7 +2179,7 @@ fn get_all_import_attributes<'hir>(
2184
2179
attrs = import_attrs. iter ( ) . map ( |attr| ( Cow :: Borrowed ( attr) , Some ( def_id) ) ) . collect ( ) ;
2185
2180
first = false ;
2186
2181
} 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) ) ;
2188
2183
}
2189
2184
}
2190
2185
attrs
@@ -2584,7 +2579,8 @@ fn clean_use_statement_inner<'tcx>(
2584
2579
} else {
2585
2580
if inline_attr. is_none ( )
2586
2581
&& 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 ( )
2588
2584
{
2589
2585
// if we're `pub use`ing an extern crate root, don't inline it unless we
2590
2586
// were specifically asked for it
0 commit comments