Use less rustc_type_ir in the compiler codebase

This commit does the following:
  - Replaces use of rustc_type_ir by rustc_middle in rustc_infer.
  - The DelayedMap type is exposed by rustc_middle so everything can be
    accessed through rustc_middle in a coherent manner.
  - API-layer traits, like InferCtxtLike, Interner or inherent::* must be
    accessed via rustc_type_ir, not rustc_middle::ty. For this reason
    these are not reexported by rustc_middle::ty.
  - Replaces use of ty::Interner by rustc_type_ir::Interner in
    rustc_trait_selection
This commit is contained in:
Romain Perier
2025-05-01 18:40:38 +02:00
parent 0e517d38ad
commit 6970813e78
12 changed files with 31 additions and 33 deletions

View File

@@ -156,9 +156,9 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
fn register_hidden_type_in_storage(
&self,
opaque_type_key: ty::OpaqueTypeKey<'tcx>,
hidden_ty: <Self::Interner as ty::Interner>::Ty,
span: <Self::Interner as ty::Interner>::Span,
) -> Option<<Self::Interner as ty::Interner>::Ty> {
hidden_ty: <Self::Interner as rustc_type_ir::Interner>::Ty,
span: <Self::Interner as rustc_type_ir::Interner>::Span,
) -> Option<<Self::Interner as rustc_type_ir::Interner>::Ty> {
self.0.register_hidden_type_in_storage(
opaque_type_key,
ty::OpaqueHiddenType { span, ty: hidden_ty },