1
Fork 0

Remove a hir_* helper that was just forwarding to a query

This commit is contained in:
Oli Scherer 2025-04-01 09:48:17 +00:00
parent 7192a0643d
commit 062ef5365d
3 changed files with 2 additions and 6 deletions

View file

@ -365,7 +365,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
// obligation comes from the `impl`. Find that `impl` so that we can point
// at it in the suggestion.
let trait_did = trait_id.to_def_id();
tcx.hir_trait_impls(trait_did).iter().find_map(|&impl_did| {
tcx.local_trait_impls(trait_did).iter().find_map(|&impl_did| {
if let Node::Item(Item {
kind: ItemKind::Impl(hir::Impl { self_ty, .. }), ..
}) = tcx.hir_node_by_def_id(impl_did)