@@ -121,9 +121,12 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
121
121
def : TyDefId ,
122
122
) -> crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ;
123
123
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 ) ;
127
130
128
131
/// Returns the type of the value of the given constant, or `None` if the `ValueTyDefId` is
129
132
/// a `StructId` or `EnumVariantId` with a record constructor.
@@ -133,35 +136,56 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
133
136
def : ValueTyDefId ,
134
137
) -> Option < crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > > ;
135
138
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 ) ;
139
145
140
146
#[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
141
147
#[ salsa:: transparent]
142
148
fn impl_self_ty ( & self , def : ImplId ) -> Binders < Ty > ;
143
149
144
150
// 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 ) ;
148
157
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) ]
151
161
fn const_param_ty ( & self , def : ConstParamId ) -> Ty ;
152
162
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
+ ) > ;
155
171
156
172
#[ salsa:: invoke( crate :: lower:: impl_trait_query) ]
157
173
#[ salsa:: transparent]
158
174
fn impl_trait ( & self , def : ImplId ) -> Option < Binders < TraitRef > > ;
159
175
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 ,
163
179
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
+ ) ;
165
189
166
190
#[ salsa:: invoke( crate :: lower:: field_types_query) ]
167
191
#[ salsa:: transparent]
@@ -191,6 +215,21 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
191
215
#[ salsa:: invoke( crate :: lower:: generic_predicates_query) ]
192
216
fn generic_predicates ( & self , def : GenericDefId ) -> GenericPredicates ;
193
217
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
+
194
233
#[ salsa:: invoke( crate :: lower_nextsolver:: trait_environment_for_body_query) ]
195
234
#[ salsa:: transparent]
196
235
fn trait_environment_for_body < ' db > ( & ' db self , def : DefWithBodyId )
@@ -286,68 +325,24 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
286
325
287
326
// next trait solver
288
327
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
-
303
328
#[ salsa:: invoke( crate :: lower_nextsolver:: impl_self_ty_query) ]
304
329
#[ salsa:: transparent]
305
330
fn impl_self_ty_ns < ' db > (
306
331
& ' db self ,
307
332
def : ImplId ,
308
333
) -> crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: Ty < ' db > > ;
309
334
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
-
317
335
#[ salsa:: invoke( crate :: lower_nextsolver:: const_param_ty_query) ]
318
336
#[ salsa:: transparent]
319
337
fn const_param_ty_ns < ' db > ( & ' db self , def : ConstParamId ) -> crate :: next_solver:: Ty < ' db > ;
320
338
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
-
330
339
#[ salsa:: invoke( crate :: lower_nextsolver:: impl_trait_query) ]
331
340
#[ salsa:: transparent]
332
341
fn impl_trait_ns < ' db > (
333
342
& ' db self ,
334
343
def : ImplId ,
335
344
) -> Option < crate :: next_solver:: EarlyBinder < ' db , crate :: next_solver:: TraitRef < ' db > > > ;
336
345
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
-
351
346
#[ salsa:: invoke( crate :: lower_nextsolver:: field_types_query) ]
352
347
#[ salsa:: transparent]
353
348
fn field_types_ns < ' db > (
@@ -383,21 +378,6 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
383
378
& ' db self ,
384
379
def : GenericDefId ,
385
380
) -> 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 > ;
401
381
}
402
382
403
383
#[ test]
0 commit comments