This is an internal tracking issue for the migration type system components into rustc_type_ir and rustc_next_trait_solver to be shared with RustAnalyzer and other users. See the dev-guide for more information.
This is mostly just a loose collection of things we should move into the shared library at some point. Please go to the the #t-types/trait-system-initiative zulip to discuss things and for mentoring opportunities. I will try to link to the relevant zulip topic for anything where it feels fairly clear what to do, while other migrations are less obvious or may interfere with work currently being done.
Specific work items
Long term goals
partially move InferCtxt into rustc_type_ir
uplift non-borrowck region handling
Implementation history
This list is very much incomplete, if you find any PRs which have been relevant here please DM @lcnr on zulip about them or add them yourself.
@compiler-errors Use rustc_type_ir directly less in the codebase #138464 Register USAGE_OF_TYPE_IR_INHERENT, remove inherent usages #137263 Deny imports of rustc_type_ir::inherent outside of type ir + new trait solver #129678 Rename tcx to cx in rustc_type_ir #127810 Uplift elaboration into rustc_type_ir #127439 uplift PredicateEmittingRelation #127405 Uplift outlives components to rustc_type_ir #127386 Split SolverDelegate back out from InferCtxtLike #127333 Add SliceLike to rustc_type_ir, use it in the generic solver code (+ some other changes) #126813 Rename a bunch of things in the new solver and rustc_type_ir #126650 Uplift next trait solver to rustc_next_trait_solver #126614 More preparation for new trait solver uplifting #126492 Uplift {Closure,Coroutine,CoroutineClosure}Args and friends to rustc_type_ir #125775 Uplift Relate/TypeRelation into rustc_next_trait_solver #125724 Uplift EarlyBinder into rustc_type_ir #125597 Uplift Binder, OutlivesPredicate into rustc_type_ir #125335 Uplift RegionVid, TermKind to rustc_type_ir, and EagerResolver to rustc_next_trait_solver #125284 Uplift more query stuff #125230 Uplift FnSig into rustc_type_ir (redux) #125170 Uplift Goal to rustc_type_ir #125150 Uplift AliasTy and AliasTerm #125088 Uplift various *Predicate types into rustc_type_ir #125001 Uplift TraitRef into rustc_type_ir #124982 Add a way to add constructors for rustc_type_ir types #121703 Uplift TypeVisitableExt into rustc_type_ir #120498 Uplift TypeAndMut and ClosureKind to rustc_type_ir #118888 Make most rustc_type_ir kinds Copy by default #118841 Uplift InferConst to rustc_type_ir #117851 Uplift the (new solver) canonicalizer into rustc_next_trait_solver #117586 Uplift CanonicalVarInfo and friends into rustc_type_ir #117582 Add HashStable_NoContext to simplify HashStable implementations in rustc_type_ir #117580 Derive TyEncodable/TyDecodable in rustc_type_ir #117578 Use derivative for Clone/PartialOrd/Ord/Hash in rustc_type_ir #117407 Get rid of 'tcx lifetime on ConstVid, EffectVid #117139 Uplift Canonical to rustc_type_ir #117008 Uplift ClauseKind and PredicateKind into rustc_type_ir #116993 Restructure rustc_type_ir a bit #116951 Some renaming nits for rustc_type_ir #116912 Begin to abstract rustc_type_ir for rust-analyzer #116828
@ChayimFriedman2 Implement some trait for next solver's lang item enums #156297 Pass the whole GenericArgs to Interner::for_each_relevant_impl() #156295 Use special DefIds for aliases #155981 Add a missing GenericTypeVisitable, and avoid having interner traits for FnSigKind and Abi #155562 Implement GenericTypeVisitable for some types #155034 Provide an extended framework for type visit, for use in rust-analyzer #149856 Make UnevaluatedConst have a specific ID type in the new solver #147723 Don't require next-solver ProbeRef to be Copy #146182 Migrate more things in the new solver to specific DefIds #146111 Switch next solver to use a specific associated type for trait def id #145377
@Jamesbarford Move Region from rustc_middle to rustc_type_ir #154989 Support generic params in Lift_Generic #156956 Extend capabilities of TypeFoldable_Generic #157695 Revert Ty type alias in rustc_type_ir #154709 Create Ty type alias in rustc_type_ir #154270 Move struct placeholder pt2 #150271 Move struct Placeholder<T> #149535
This is an internal tracking issue for the migration type system components into
rustc_type_irandrustc_next_trait_solverto be shared with RustAnalyzer and other users. See the dev-guide for more information.This is mostly just a loose collection of things we should move into the shared library at some point. Please go to the the
#t-types/trait-system-initiativezulip to discuss things and for mentoring opportunities. I will try to link to the relevant zulip topic for anything where it feels fairly clear what to do, while other migrations are less obvious or may interfere with work currently being done.Specific work items
Regionextension traits to be inherent instead, where possiblety::Constsimilar to Move Region from rustc_middle to rustc_type_ir #154989rustc_type_irLowerUniverseFolderintorustc_type_irLong term goals
InferCtxtintorustc_type_irImplementation history
This list is very much incomplete, if you find any PRs which have been relevant here please DM @lcnr on zulip about them or add them yourself.
rustc_type_irdirectly less in the codebase #138464 RegisterUSAGE_OF_TYPE_IR_INHERENT, remove inherent usages #137263 Deny imports ofrustc_type_ir::inherentoutside of type ir + new trait solver #129678 Renametcxtocxinrustc_type_ir#127810 Uplift elaboration intorustc_type_ir#127439 upliftPredicateEmittingRelation#127405 Uplift outlives components torustc_type_ir#127386 SplitSolverDelegateback out fromInferCtxtLike#127333 AddSliceLiketorustc_type_ir, use it in the generic solver code (+ some other changes) #126813 Rename a bunch of things in the new solver andrustc_type_ir#126650 Uplift next trait solver torustc_next_trait_solver#126614 More preparation for new trait solver uplifting #126492 Uplift{Closure,Coroutine,CoroutineClosure}Argsand friends torustc_type_ir#125775 UpliftRelate/TypeRelationintorustc_next_trait_solver#125724 UpliftEarlyBinderintorustc_type_ir#125597 UpliftBinder,OutlivesPredicateintorustc_type_ir#125335 UpliftRegionVid,TermKindtorustc_type_ir, andEagerResolvertorustc_next_trait_solver#125284 Uplift more query stuff #125230 UpliftFnSigintorustc_type_ir(redux) #125170 UpliftGoaltorustc_type_ir#125150 UpliftAliasTyandAliasTerm#125088 Uplift various*Predicatetypes intorustc_type_ir#125001 UpliftTraitRefintorustc_type_ir#124982 Add a way to add constructors forrustc_type_irtypes #121703 UpliftTypeVisitableExtintorustc_type_ir#120498 UpliftTypeAndMutandClosureKindtorustc_type_ir#118888 Make mostrustc_type_irkindsCopyby default #118841 UpliftInferConsttorustc_type_ir#117851 Uplift the (new solver) canonicalizer intorustc_next_trait_solver#117586 UpliftCanonicalVarInfoand friends intorustc_type_ir#117582 AddHashStable_NoContextto simplifyHashStableimplementations inrustc_type_ir#117580 DeriveTyEncodable/TyDecodableinrustc_type_ir#117578 Use derivative forClone/PartialOrd/Ord/Hashinrustc_type_ir#117407 Get rid of'tcxlifetime onConstVid,EffectVid#117139 UpliftCanonicaltorustc_type_ir#117008 UpliftClauseKindandPredicateKindintorustc_type_ir#116993 Restructurerustc_type_ira bit #116951 Some renaming nits forrustc_type_ir#116912 Begin to abstractrustc_type_irfor rust-analyzer #116828GenericArgstoInterner::for_each_relevant_impl()#156295 Use special DefIds for aliases #155981 Add a missingGenericTypeVisitable, and avoid having interner traits forFnSigKindandAbi#155562 ImplementGenericTypeVisitablefor some types #155034 Provide an extended framework for type visit, for use in rust-analyzer #149856 MakeUnevaluatedConsthave a specific ID type in the new solver #147723 Don't require next-solverProbeRefto beCopy#146182 Migrate more things in the new solver to specificDefIds #146111 Switch next solver to use a specific associated type for trait def id #145377Lift_Generic#156956 Extend capabilities ofTypeFoldable_Generic#157695 RevertTytype alias inrustc_type_ir#154709 CreateTytype alias inrustc_type_ir#154270 Move struct placeholder pt2 #150271 Movestruct Placeholder<T>#149535