1
Fork 0

Get rid of the hir_owner query.

This commit is contained in:
Camille GILLOT 2024-01-15 22:31:02 +00:00
parent 92f2e0aa62
commit b99c3ae6d6
7 changed files with 42 additions and 77 deletions

View file

@ -160,10 +160,6 @@ impl<T> EraseType for Option<&'_ [T]> {
type Result = [u8; size_of::<Option<&'static [()]>>()];
}
impl EraseType for Option<rustc_middle::hir::Owner<'_>> {
type Result = [u8; size_of::<Option<rustc_middle::hir::Owner<'static>>>()];
}
impl EraseType for Option<mir::DestructuredConstant<'_>> {
type Result = [u8; size_of::<Option<mir::DestructuredConstant<'static>>>()];
}
@ -320,7 +316,6 @@ macro_rules! tcx_lifetime {
}
tcx_lifetime! {
rustc_middle::hir::Owner,
rustc_middle::middle::exported_symbols::ExportedSymbol,
rustc_middle::mir::Const,
rustc_middle::mir::DestructuredConstant,

View file

@ -174,14 +174,6 @@ rustc_queries! {
cache_on_disk_if { true }
}
/// Gives access to the HIR node for the HIR owner `key`.
///
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query hir_owner(key: hir::OwnerId) -> Option<crate::hir::Owner<'tcx>> {
desc { |tcx| "getting HIR owner of `{}`", tcx.def_path_str(key) }
}
/// Gives access to the HIR ID for the given `LocalDefId` owner `key` if any.
///
/// Definitions that were generated with no HIR, would be fed to return `None`.