Remove a hir_*
helper that was just forwarding to a query
This commit is contained in:
parent
7192a0643d
commit
062ef5365d
3 changed files with 2 additions and 6 deletions
|
@ -367,10 +367,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn hir_trait_impls(self, trait_did: DefId) -> &'tcx [LocalDefId] {
|
|
||||||
self.local_trait_impls(trait_did)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the attributes on the crate. This is preferable to
|
/// Gets the attributes on the crate. This is preferable to
|
||||||
/// invoking `krate.attrs` because it registers a tighter
|
/// invoking `krate.attrs` because it registers a tighter
|
||||||
/// dep-graph access.
|
/// dep-graph access.
|
||||||
|
|
|
@ -235,7 +235,7 @@ pub(super) fn trait_impls_of_provider(tcx: TyCtxt<'_>, trait_id: DefId) -> Trait
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for &impl_def_id in tcx.hir_trait_impls(trait_id) {
|
for &impl_def_id in tcx.local_trait_impls(trait_id) {
|
||||||
let impl_def_id = impl_def_id.to_def_id();
|
let impl_def_id = impl_def_id.to_def_id();
|
||||||
|
|
||||||
let impl_self_ty = tcx.type_of(impl_def_id).instantiate_identity();
|
let impl_self_ty = tcx.type_of(impl_def_id).instantiate_identity();
|
||||||
|
|
|
@ -365,7 +365,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||||
// obligation comes from the `impl`. Find that `impl` so that we can point
|
// obligation comes from the `impl`. Find that `impl` so that we can point
|
||||||
// at it in the suggestion.
|
// at it in the suggestion.
|
||||||
let trait_did = trait_id.to_def_id();
|
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 {
|
if let Node::Item(Item {
|
||||||
kind: ItemKind::Impl(hir::Impl { self_ty, .. }), ..
|
kind: ItemKind::Impl(hir::Impl { self_ty, .. }), ..
|
||||||
}) = tcx.hir_node_by_def_id(impl_did)
|
}) = tcx.hir_node_by_def_id(impl_did)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue