@@ -121,9 +121,12 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
121121 def : TyDefId ,
122122 ) -> crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ;
123123
124- #[ salsa:: invoke( crate :: lower:: type_for_type_alias_with_diagnostics_query) ]
125- #[ salsa:: cycle( cycle_result = crate :: lower:: type_for_type_alias_with_diagnostics_cycle_result) ]
126- fn type_for_type_alias_with_diagnostics ( & self , def : TypeAliasId ) -> ( Binders < Ty > , Diagnostics ) ;
124+ #[ salsa:: invoke( crate :: lower_nextsolver:: type_for_type_alias_with_diagnostics_query) ]
125+ #[ salsa:: cycle( cycle_result = crate :: lower_nextsolver:: type_for_type_alias_with_diagnostics_cycle_result) ]
126+ fn type_for_type_alias_with_diagnostics < ' db > (
127+ & ' db self ,
128+ def : TypeAliasId ,
129+ ) -> ( crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > , Diagnostics ) ;
127130
128131 /// Returns the type of the value of the given constant, or `None` if the `ValueTyDefId` is
129132 /// a `StructId` or `EnumVariantId` with a record constructor.
@@ -133,35 +136,56 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
133136 def : ValueTyDefId ,
134137 ) -> Option < crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > > ;
135138
136- #[ salsa:: invoke( crate :: lower:: impl_self_ty_with_diagnostics_query) ]
137- #[ salsa:: cycle( cycle_result = crate :: lower:: impl_self_ty_with_diagnostics_cycle_result) ]
138- fn impl_self_ty_with_diagnostics ( & self , def : ImplId ) -> ( Binders < Ty > , Diagnostics ) ;
139+ #[ salsa:: invoke( crate :: lower_nextsolver:: impl_self_ty_with_diagnostics_query) ]
140+ #[ salsa:: cycle( cycle_result = crate :: lower_nextsolver:: impl_self_ty_with_diagnostics_cycle_result) ]
141+ fn impl_self_ty_with_diagnostics < ' db > (
142+ & ' db self ,
143+ def : ImplId ,
144+ ) -> ( crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > , Diagnostics ) ;
139145
140146 #[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
141147 #[ salsa:: transparent]
142148 fn impl_self_ty ( & self , def : ImplId ) -> Binders < Ty > ;
143149
144150 // FIXME: Make this a non-interned query.
145- #[ salsa:: invoke_interned( crate :: lower:: const_param_ty_with_diagnostics_query) ]
146- #[ salsa:: cycle( cycle_result = crate :: lower:: const_param_ty_with_diagnostics_cycle_result) ]
147- fn const_param_ty_with_diagnostics ( & self , def : ConstParamId ) -> ( Ty , Diagnostics ) ;
151+ #[ salsa:: invoke_interned( crate :: lower_nextsolver:: const_param_ty_with_diagnostics_query) ]
152+ #[ salsa:: cycle( cycle_result = crate :: lower_nextsolver:: const_param_ty_with_diagnostics_cycle_result) ]
153+ fn const_param_ty_with_diagnostics < ' db > (
154+ & ' db self ,
155+ def : ConstParamId ,
156+ ) -> ( crate :: next_solver:: Ty < ' db > , Diagnostics ) ;
148157
149- #[ salsa:: invoke( crate :: lower:: const_param_ty_query) ]
150- #[ salsa:: transparent]
158+ // FIXME: Make this a non-interned query.
159+ #[ salsa:: invoke_interned( crate :: lower:: const_param_ty_query) ]
160+ #[ salsa:: cycle( cycle_result = crate :: lower:: const_param_ty_cycle_result) ]
151161 fn const_param_ty ( & self , def : ConstParamId ) -> Ty ;
152162
153- #[ salsa:: invoke( crate :: lower:: impl_trait_with_diagnostics_query) ]
154- fn impl_trait_with_diagnostics ( & self , def : ImplId ) -> Option < ( Binders < TraitRef > , Diagnostics ) > ;
163+ #[ salsa:: invoke( crate :: lower_nextsolver:: impl_trait_with_diagnostics_query) ]
164+ fn impl_trait_with_diagnostics < ' db > (
165+ & ' db self ,
166+ def : ImplId ,
167+ ) -> Option < (
168+ crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: TraitRef < ' db > > ,
169+ Diagnostics ,
170+ ) > ;
155171
156172 #[ salsa:: invoke( crate :: lower:: impl_trait_query) ]
157173 #[ salsa:: transparent]
158174 fn impl_trait ( & self , def : ImplId ) -> Option < Binders < TraitRef > > ;
159175
160- #[ salsa:: invoke( crate :: lower :: field_types_with_diagnostics_query) ]
161- fn field_types_with_diagnostics (
162- & self ,
176+ #[ salsa:: invoke( crate :: lower_nextsolver :: field_types_with_diagnostics_query) ]
177+ fn field_types_with_diagnostics < ' db > (
178+ & ' db self ,
163179 var : VariantId ,
164- ) -> ( Arc < ArenaMap < LocalFieldId , Binders < Ty > > > , Diagnostics ) ;
180+ ) -> (
181+ Arc <
182+ ArenaMap <
183+ LocalFieldId ,
184+ crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ,
185+ > ,
186+ > ,
187+ Diagnostics ,
188+ ) ;
165189
166190 #[ salsa:: invoke( crate :: lower:: field_types_query) ]
167191 #[ salsa:: transparent]
@@ -191,6 +215,21 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
191215 #[ salsa:: invoke( crate :: lower:: generic_predicates_query) ]
192216 fn generic_predicates ( & self , def : GenericDefId ) -> GenericPredicates ;
193217
218+ #[ salsa:: invoke(
219+ crate :: lower_nextsolver:: generic_predicates_without_parent_with_diagnostics_query
220+ ) ]
221+ fn generic_predicates_without_parent_with_diagnostics < ' db > (
222+ & ' db self ,
223+ def : GenericDefId ,
224+ ) -> ( crate :: lower_nextsolver:: GenericPredicates < ' db > , Diagnostics ) ;
225+
226+ #[ salsa:: invoke( crate :: lower_nextsolver:: generic_predicates_without_parent_query) ]
227+ #[ salsa:: transparent]
228+ fn generic_predicates_without_parent < ' db > (
229+ & ' db self ,
230+ def : GenericDefId ,
231+ ) -> crate :: lower_nextsolver:: GenericPredicates < ' db > ;
232+
194233 #[ salsa:: invoke( crate :: lower_nextsolver:: trait_environment_for_body_query) ]
195234 #[ salsa:: transparent]
196235 fn trait_environment_for_body < ' db > ( & ' db self , def : DefWithBodyId )
@@ -286,68 +325,24 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
286325
287326 // next trait solver
288327
289- #[ salsa:: invoke( crate :: lower_nextsolver:: type_for_type_alias_with_diagnostics_query) ]
290- #[ salsa:: cycle( cycle_result = crate :: lower_nextsolver:: type_for_type_alias_with_diagnostics_cycle_result) ]
291- fn type_for_type_alias_with_diagnostics_ns < ' db > (
292- & ' db self ,
293- def : TypeAliasId ,
294- ) -> ( crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > , Diagnostics ) ;
295-
296- #[ salsa:: invoke( crate :: lower_nextsolver:: impl_self_ty_with_diagnostics_query) ]
297- #[ salsa:: cycle( cycle_result = crate :: lower_nextsolver:: impl_self_ty_with_diagnostics_cycle_result) ]
298- fn impl_self_ty_with_diagnostics_ns < ' db > (
299- & ' db self ,
300- def : ImplId ,
301- ) -> ( crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > , Diagnostics ) ;
302-
303328 #[ salsa:: invoke( crate :: lower_nextsolver:: impl_self_ty_query) ]
304329 #[ salsa:: transparent]
305330 fn impl_self_ty_ns < ' db > (
306331 & ' db self ,
307332 def : ImplId ,
308333 ) -> crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ;
309334
310- // FIXME: Make this a non-interned query.
311- #[ salsa:: invoke_interned( crate :: lower_nextsolver:: const_param_ty_with_diagnostics_query) ]
312- fn const_param_ty_with_diagnostics_ns < ' db > (
313- & ' db self ,
314- def : ConstParamId ,
315- ) -> ( crate :: next_solver:: Ty < ' db > , Diagnostics ) ;
316-
317335 #[ salsa:: invoke( crate :: lower_nextsolver:: const_param_ty_query) ]
318336 #[ salsa:: transparent]
319337 fn const_param_ty_ns < ' db > ( & ' db self , def : ConstParamId ) -> crate :: next_solver:: Ty < ' db > ;
320338
321- #[ salsa:: invoke( crate :: lower_nextsolver:: impl_trait_with_diagnostics_query) ]
322- fn impl_trait_with_diagnostics_ns < ' db > (
323- & ' db self ,
324- def : ImplId ,
325- ) -> Option < (
326- crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: TraitRef < ' db > > ,
327- Diagnostics ,
328- ) > ;
329-
330339 #[ salsa:: invoke( crate :: lower_nextsolver:: impl_trait_query) ]
331340 #[ salsa:: transparent]
332341 fn impl_trait_ns < ' db > (
333342 & ' db self ,
334343 def : ImplId ,
335344 ) -> Option < crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: TraitRef < ' db > > > ;
336345
337- #[ salsa:: invoke( crate :: lower_nextsolver:: field_types_with_diagnostics_query) ]
338- fn field_types_with_diagnostics_ns < ' db > (
339- & ' db self ,
340- var : VariantId ,
341- ) -> (
342- Arc <
343- ArenaMap <
344- LocalFieldId ,
345- crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ,
346- > ,
347- > ,
348- Diagnostics ,
349- ) ;
350-
351346 #[ salsa:: invoke( crate :: lower_nextsolver:: field_types_query) ]
352347 #[ salsa:: transparent]
353348 fn field_types_ns < ' db > (
@@ -383,21 +378,6 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
383378 & ' db self ,
384379 def : GenericDefId ,
385380 ) -> crate :: lower_nextsolver:: GenericPredicates < ' db > ;
386-
387- #[ salsa:: invoke(
388- crate :: lower_nextsolver:: generic_predicates_without_parent_with_diagnostics_query
389- ) ]
390- fn generic_predicates_without_parent_with_diagnostics_ns < ' db > (
391- & ' db self ,
392- def : GenericDefId ,
393- ) -> ( crate :: lower_nextsolver:: GenericPredicates < ' db > , Diagnostics ) ;
394-
395- #[ salsa:: invoke( crate :: lower_nextsolver:: generic_predicates_without_parent_query) ]
396- #[ salsa:: transparent]
397- fn generic_predicates_without_parent_ns < ' db > (
398- & ' db self ,
399- def : GenericDefId ,
400- ) -> crate :: lower_nextsolver:: GenericPredicates < ' db > ;
401381}
402382
403383#[ test]
0 commit comments