Skip to content

Commit 6da1461

Browse files
authored
Rollup merge of rust-lang#88677 - petrochenkov:exportid, r=davidtwco
rustc: Remove local variable IDs from `Export`s Local variables can never be exported.
2 parents e6455ea + 9163ac9 commit 6da1461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res {
520520
}
521521
};
522522
}
523-
fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export<HirId>> {
523+
fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export> {
524524
tcx.item_children(def_id)
525525
.iter()
526526
.find(|item| item.ident.name.as_str() == name)
@@ -557,7 +557,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res {
557557
None
558558
}
559559
});
560-
try_res!(last).res
560+
try_res!(last).res.expect_non_local()
561561
}
562562

563563
/// Convenience function to get the `DefId` of a trait by path.

0 commit comments

Comments
 (0)