@@ -52,7 +52,7 @@ use rustc_session::{Limit, Session};
5252use rustc_span:: def_id:: { CRATE_DEF_ID , DefPathHash , StableCrateId } ;
5353use rustc_span:: { DUMMY_SP , Ident , Span , Symbol , kw, sym} ;
5454use rustc_type_ir:: TyKind :: * ;
55- use rustc_type_ir:: lang_items:: { SolverLangItem , SolverTraitLangItem } ;
55+ use rustc_type_ir:: lang_items:: { SolverAdtLangItem , SolverLangItem , SolverTraitLangItem } ;
5656pub use rustc_type_ir:: lift:: Lift ;
5757use rustc_type_ir:: {
5858 CollectAndApply , Interner , TypeFlags , TypeFoldable , WithCachedTypeInfo , elaborate, search_graph,
@@ -94,6 +94,13 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
9494 type DefId = DefId ;
9595 type LocalDefId = LocalDefId ;
9696 type TraitId = DefId ;
97+ type ForeignId = DefId ;
98+ type FunctionId = DefId ;
99+ type ClosureId = DefId ;
100+ type CoroutineClosureId = DefId ;
101+ type CoroutineId = DefId ;
102+ type AdtId = DefId ;
103+ type ImplId = DefId ;
97104 type Span = Span ;
98105
99106 type GenericArgs = ty:: GenericArgsRef < ' tcx > ;
@@ -492,6 +499,10 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
492499 self . require_lang_item ( solver_trait_lang_item_to_lang_item ( lang_item) , DUMMY_SP )
493500 }
494501
502+ fn require_adt_lang_item ( self , lang_item : SolverAdtLangItem ) -> DefId {
503+ self . require_lang_item ( solver_adt_lang_item_to_lang_item ( lang_item) , DUMMY_SP )
504+ }
505+
495506 fn is_lang_item ( self , def_id : DefId , lang_item : SolverLangItem ) -> bool {
496507 self . is_lang_item ( def_id, solver_lang_item_to_lang_item ( lang_item) )
497508 }
@@ -500,6 +511,10 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
500511 self . is_lang_item ( def_id, solver_trait_lang_item_to_lang_item ( lang_item) )
501512 }
502513
514+ fn is_adt_lang_item ( self , def_id : DefId , lang_item : SolverAdtLangItem ) -> bool {
515+ self . is_lang_item ( def_id, solver_adt_lang_item_to_lang_item ( lang_item) )
516+ }
517+
503518 fn is_default_trait ( self , def_id : DefId ) -> bool {
504519 self . is_default_trait ( def_id)
505520 }
@@ -512,6 +527,10 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
512527 lang_item_to_solver_trait_lang_item ( self . lang_items ( ) . from_def_id ( def_id) ?)
513528 }
514529
530+ fn as_adt_lang_item ( self , def_id : DefId ) -> Option < SolverAdtLangItem > {
531+ lang_item_to_solver_adt_lang_item ( self . lang_items ( ) . from_def_id ( def_id) ?)
532+ }
533+
515534 fn associated_type_def_ids ( self , def_id : DefId ) -> impl IntoIterator < Item = DefId > {
516535 self . associated_items ( def_id)
517536 . in_definition_order ( )
@@ -783,6 +802,13 @@ bidirectional_lang_item_map! {
783802 DynMetadata ,
784803 FutureOutput ,
785804 Metadata ,
805+ // tidy-alphabetical-end
806+ }
807+
808+ bidirectional_lang_item_map ! {
809+ SolverAdtLangItem , lang_item_to_solver_adt_lang_item, solver_adt_lang_item_to_lang_item;
810+
811+ // tidy-alphabetical-start
786812 Option ,
787813 Poll ,
788814// tidy-alphabetical-end
0 commit comments