@@ -34,6 +34,8 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
3434 #[ salsa:: invoke( crate :: infer:: infer_query) ]
3535 fn infer_query ( & self , def : DefWithBodyId ) -> Arc < InferenceResult > ;
3636
37+ // region:mir
38+
3739 #[ salsa:: invoke( crate :: mir:: mir_body_query) ]
3840 #[ salsa:: cycle( crate :: mir:: mir_body_recover) ]
3941 fn mir_body ( & self , def : DefWithBodyId ) -> Result < Arc < MirBody > , MirLowerError > ;
@@ -61,20 +63,6 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
6163 #[ salsa:: invoke( crate :: mir:: borrowck_query) ]
6264 fn borrowck ( & self , def : DefWithBodyId ) -> Result < Arc < [ BorrowckResult ] > , MirLowerError > ;
6365
64- #[ salsa:: invoke( crate :: lower:: ty_query) ]
65- #[ salsa:: cycle( crate :: lower:: ty_recover) ]
66- fn ty ( & self , def : TyDefId ) -> Binders < Ty > ;
67-
68- #[ salsa:: invoke( crate :: lower:: value_ty_query) ]
69- fn value_ty ( & self , def : ValueTyDefId ) -> Binders < Ty > ;
70-
71- #[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
72- #[ salsa:: cycle( crate :: lower:: impl_self_ty_recover) ]
73- fn impl_self_ty ( & self , def : ImplId ) -> Binders < Ty > ;
74-
75- #[ salsa:: invoke( crate :: lower:: const_param_ty_query) ]
76- fn const_param_ty ( & self , def : ConstParamId ) -> Ty ;
77-
7866 #[ salsa:: invoke( crate :: consteval:: const_eval_query) ]
7967 #[ salsa:: cycle( crate :: consteval:: const_eval_recover) ]
8068 fn const_eval (
@@ -92,6 +80,22 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
9280 #[ salsa:: cycle( crate :: consteval:: const_eval_discriminant_recover) ]
9381 fn const_eval_discriminant ( & self , def : EnumVariantId ) -> Result < i128 , ConstEvalError > ;
9482
83+ // endregion:mir
84+
85+ #[ salsa:: invoke( crate :: lower:: ty_query) ]
86+ #[ salsa:: cycle( crate :: lower:: ty_recover) ]
87+ fn ty ( & self , def : TyDefId ) -> Binders < Ty > ;
88+
89+ #[ salsa:: invoke( crate :: lower:: value_ty_query) ]
90+ fn value_ty ( & self , def : ValueTyDefId ) -> Binders < Ty > ;
91+
92+ #[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
93+ #[ salsa:: cycle( crate :: lower:: impl_self_ty_recover) ]
94+ fn impl_self_ty ( & self , def : ImplId ) -> Binders < Ty > ;
95+
96+ #[ salsa:: invoke( crate :: lower:: const_param_ty_query) ]
97+ fn const_param_ty ( & self , def : ConstParamId ) -> Ty ;
98+
9599 #[ salsa:: invoke( crate :: lower:: impl_trait_query) ]
96100 fn impl_trait ( & self , def : ImplId ) -> Option < Binders < TraitRef > > ;
97101
@@ -158,7 +162,7 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
158162 fn inherent_impls_in_crate ( & self , krate : CrateId ) -> Arc < InherentImpls > ;
159163
160164 #[ salsa:: invoke( InherentImpls :: inherent_impls_in_block_query) ]
161- fn inherent_impls_in_block ( & self , block : BlockId ) -> Arc < InherentImpls > ;
165+ fn inherent_impls_in_block ( & self , block : BlockId ) -> Option < Arc < InherentImpls > > ;
162166
163167 /// Collects all crates in the dependency graph that have impls for the
164168 /// given fingerprint. This is only used for primitive types and types
@@ -175,7 +179,7 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
175179 fn trait_impls_in_crate ( & self , krate : CrateId ) -> Arc < TraitImpls > ;
176180
177181 #[ salsa:: invoke( TraitImpls :: trait_impls_in_block_query) ]
178- fn trait_impls_in_block ( & self , block : BlockId ) -> Arc < TraitImpls > ;
182+ fn trait_impls_in_block ( & self , block : BlockId ) -> Option < Arc < TraitImpls > > ;
179183
180184 #[ salsa:: invoke( TraitImpls :: trait_impls_in_deps_query) ]
181185 fn trait_impls_in_deps ( & self , krate : CrateId ) -> Arc < [ Arc < TraitImpls > ] > ;
0 commit comments