Rollup merge of #88677 - petrochenkov:exportid, r=davidtwco
rustc: Remove local variable IDs from `Export`s Local variables can never be exported.
This commit is contained in:
commit
6da14613e7
1 changed files with 2 additions and 2 deletions
|
@ -520,7 +520,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export<HirId>> {
|
fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export> {
|
||||||
tcx.item_children(def_id)
|
tcx.item_children(def_id)
|
||||||
.iter()
|
.iter()
|
||||||
.find(|item| item.ident.name.as_str() == name)
|
.find(|item| item.ident.name.as_str() == name)
|
||||||
|
@ -557,7 +557,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
try_res!(last).res
|
try_res!(last).res.expect_non_local()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convenience function to get the `DefId` of a trait by path.
|
/// Convenience function to get the `DefId` of a trait by path.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue