@@ -8,7 +8,7 @@ use rustc_hir::def::{CtorKind, CtorOf, DefKind};
88use rustc_hir:: def_id:: { DefId , LocalDefId } ;
99use rustc_hir:: lang_items:: LangItem ;
1010use rustc_span:: { DUMMY_SP , Span , Symbol } ;
11- use rustc_type_ir:: lang_items:: { SolverAdtLangItem , SolverLangItem , SolverTraitLangItem } ;
11+ use rustc_type_ir:: lang_items:: { SolverAdtLangItem , SolverProjectionLangItem , SolverTraitLangItem } ;
1212use rustc_type_ir:: { CollectAndApply , Interner , TypeFoldable , Unnormalized , search_graph} ;
1313
1414use crate :: dep_graph:: { DepKind , DepNodeIndex } ;
@@ -39,6 +39,17 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
3939 type AdtId = DefId ;
4040 type ImplId = DefId ;
4141 type UnevaluatedConstId = DefId ;
42+ type DefinitionAssocTyId = DefId ;
43+ type DefinitionAssocConstId = DefId ;
44+ type DefinitionAssocTermId = DefId ;
45+ type OpaqueTyId = DefId ;
46+ type LocalOpaqueTyId = LocalDefId ;
47+ type FreeTyAliasId = DefId ;
48+ type FreeConstAliasId = DefId ;
49+ type FreeTermAliasId = DefId ;
50+ type ImplOrTraitAssocTyId = DefId ;
51+ type ImplOrTraitAssocConstId = DefId ;
52+ type ImplOrTraitAssocTermId = DefId ;
4253 type Span = Span ;
4354
4455 type GenericArgs = ty:: GenericArgsRef < ' tcx > ;
@@ -285,7 +296,11 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
285296 self . mk_type_list_from_iter ( args)
286297 }
287298
288- fn parent ( self , def_id : DefId ) -> DefId {
299+ fn projection_parent ( self , def_id : Self :: DefinitionAssocTermId ) -> Self :: TraitId {
300+ self . parent ( def_id)
301+ }
302+
303+ fn impl_or_trait_assoc_term_parent ( self , def_id : Self :: ImplOrTraitAssocTyId ) -> Self :: ImplId {
289304 self . parent ( def_id)
290305 }
291306
@@ -443,7 +458,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
443458 !self . codegen_fn_attrs ( def_id) . target_features . is_empty ( )
444459 }
445460
446- fn require_lang_item ( self , lang_item : SolverLangItem ) -> DefId {
461+ fn require_projection_lang_item ( self , lang_item : SolverProjectionLangItem ) -> DefId {
447462 self . require_lang_item ( solver_lang_item_to_lang_item ( lang_item) , DUMMY_SP )
448463 }
449464
@@ -455,7 +470,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
455470 self . require_lang_item ( solver_adt_lang_item_to_lang_item ( lang_item) , DUMMY_SP )
456471 }
457472
458- fn is_lang_item ( self , def_id : DefId , lang_item : SolverLangItem ) -> bool {
473+ fn is_projection_lang_item ( self , def_id : DefId , lang_item : SolverProjectionLangItem ) -> bool {
459474 self . is_lang_item ( def_id, solver_lang_item_to_lang_item ( lang_item) )
460475 }
461476
@@ -475,7 +490,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
475490 self . is_sizedness_trait ( def_id)
476491 }
477492
478- fn as_lang_item ( self , def_id : DefId ) -> Option < SolverLangItem > {
493+ fn as_projection_lang_item ( self , def_id : DefId ) -> Option < SolverProjectionLangItem > {
479494 lang_item_to_solver_lang_item ( self . lang_items ( ) . from_def_id ( def_id) ?)
480495 }
481496
@@ -754,7 +769,7 @@ macro_rules! bidirectional_lang_item_map {
754769}
755770
756771bidirectional_lang_item_map ! {
757- SolverLangItem , fn lang_item_to_solver_lang_item, fn solver_lang_item_to_lang_item;
772+ SolverProjectionLangItem , fn lang_item_to_solver_lang_item, fn solver_lang_item_to_lang_item;
758773
759774// tidy-alphabetical-start
760775 AsyncFnKindUpvars ,
@@ -788,7 +803,6 @@ bidirectional_lang_item_map! {
788803 AsyncFnKindHelper ,
789804 AsyncFnMut ,
790805 AsyncFnOnce ,
791- AsyncFnOnceOutput ,
792806 AsyncIterator ,
793807 BikeshedGuaranteedNoDrop ,
794808 Clone ,
0 commit comments