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
@ -520,7 +520,7 @@ macro_rules! try_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)
|
||||
.iter()
|
||||
.find(|item| item.ident.name.as_str() == name)
|
||||
@ -557,7 +557,7 @@ fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Opt
|
||||
None
|
||||
}
|
||||
});
|
||||
try_res!(last).res
|
||||
try_res!(last).res.expect_non_local()
|
||||
}
|
||||
|
||||
/// Convenience function to get the `DefId` of a trait by path.
|
||||
|
Loading…
Reference in New Issue
Block a user