Skip to content

Commit 48bd2ed

Browse files
committed
Remove a hir_* helper that was just forwarding to a query
1 parent 5495c2c commit 48bd2ed

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

compiler/rustc_middle/src/hir/map.rs

-4
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,6 @@ impl<'tcx> TyCtxt<'tcx> {
367367
}
368368
}
369369

370-
pub fn hir_trait_impls(self, trait_did: DefId) -> &'tcx [LocalDefId] {
371-
self.local_trait_impls(trait_did)
372-
}
373-
374370
/// Gets the attributes on the crate. This is preferable to
375371
/// invoking `krate.attrs` because it registers a tighter
376372
/// dep-graph access.

compiler/rustc_middle/src/ty/trait_def.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub(super) fn trait_impls_of_provider(tcx: TyCtxt<'_>, trait_id: DefId) -> Trait
235235
}
236236
}
237237

238-
for &impl_def_id in tcx.hir_trait_impls(trait_id) {
238+
for &impl_def_id in tcx.local_trait_impls(trait_id) {
239239
let impl_def_id = impl_def_id.to_def_id();
240240

241241
let impl_self_ty = tcx.type_of(impl_def_id).instantiate_identity();

compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/static_impl_trait.rs

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

0 commit comments

Comments
 (0)