Address nit
This commit is contained in:
parent
e3274fd148
commit
2a0c9e28cb
@ -2208,6 +2208,7 @@ fn clean_use_statement(
|
|||||||
|
|
||||||
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
|
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
|
||||||
// crate in Rust 2018+
|
// crate in Rust 2018+
|
||||||
|
let def_id = cx.tcx.hir().local_def_id(import.hir_id).to_def_id();
|
||||||
let path = path.clean(cx);
|
let path = path.clean(cx);
|
||||||
let inner = if kind == hir::UseKind::Glob {
|
let inner = if kind == hir::UseKind::Glob {
|
||||||
if !denied {
|
if !denied {
|
||||||
@ -2239,7 +2240,7 @@ fn clean_use_statement(
|
|||||||
&mut visited,
|
&mut visited,
|
||||||
) {
|
) {
|
||||||
items.push(Item::from_def_id_and_parts(
|
items.push(Item::from_def_id_and_parts(
|
||||||
cx.tcx.hir().local_def_id(import.hir_id).to_def_id(),
|
def_id,
|
||||||
None,
|
None,
|
||||||
ImportItem(Import::new_simple(name, resolve_use_source(cx, path), false)),
|
ImportItem(Import::new_simple(name, resolve_use_source(cx, path), false)),
|
||||||
cx,
|
cx,
|
||||||
@ -2250,12 +2251,7 @@ fn clean_use_statement(
|
|||||||
Import::new_simple(name, resolve_use_source(cx, path), true)
|
Import::new_simple(name, resolve_use_source(cx, path), true)
|
||||||
};
|
};
|
||||||
|
|
||||||
vec![Item::from_def_id_and_parts(
|
vec![Item::from_def_id_and_parts(def_id, None, ImportItem(inner), cx)]
|
||||||
cx.tcx.hir().local_def_id(import.hir_id).to_def_id(),
|
|
||||||
None,
|
|
||||||
ImportItem(inner),
|
|
||||||
cx,
|
|
||||||
)]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for (&hir::ForeignItem<'_>, Option<Symbol>) {
|
impl Clean<Item> for (&hir::ForeignItem<'_>, Option<Symbol>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user