@@ -36,14 +36,14 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
36
36
// region:mir
37
37
38
38
#[ salsa:: invoke( crate :: mir:: mir_body_query) ]
39
- #[ salsa:: cycle( crate :: mir:: mir_body_recover ) ]
39
+ #[ salsa:: cycle( cycle_result = crate :: mir:: mir_body_cycle_result ) ]
40
40
fn mir_body ( & self , def : DefWithBodyId ) -> Result < Arc < MirBody > , MirLowerError > ;
41
41
42
42
#[ salsa:: invoke( crate :: mir:: mir_body_for_closure_query) ]
43
43
fn mir_body_for_closure ( & self , def : InternedClosureId ) -> Result < Arc < MirBody > , MirLowerError > ;
44
44
45
45
#[ salsa:: invoke( crate :: mir:: monomorphized_mir_body_query) ]
46
- #[ salsa:: cycle( crate :: mir:: monomorphized_mir_body_recover ) ]
46
+ #[ salsa:: cycle( cycle_result = crate :: mir:: monomorphized_mir_body_cycle_result ) ]
47
47
fn monomorphized_mir_body (
48
48
& self ,
49
49
def : DefWithBodyId ,
@@ -64,7 +64,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
64
64
fn borrowck ( & self , def : DefWithBodyId ) -> Result < Arc < [ BorrowckResult ] > , MirLowerError > ;
65
65
66
66
#[ salsa:: invoke( crate :: consteval:: const_eval_query) ]
67
- #[ salsa:: cycle( crate :: consteval:: const_eval_recover ) ]
67
+ #[ salsa:: cycle( cycle_result = crate :: consteval:: const_eval_cycle_result ) ]
68
68
fn const_eval (
69
69
& self ,
70
70
def : GeneralConstId ,
@@ -73,11 +73,11 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
73
73
) -> Result < Const , ConstEvalError > ;
74
74
75
75
#[ salsa:: invoke( crate :: consteval:: const_eval_static_query) ]
76
- #[ salsa:: cycle( crate :: consteval:: const_eval_static_recover ) ]
76
+ #[ salsa:: cycle( cycle_result = crate :: consteval:: const_eval_static_cycle_result ) ]
77
77
fn const_eval_static ( & self , def : StaticId ) -> Result < Const , ConstEvalError > ;
78
78
79
79
#[ salsa:: invoke( crate :: consteval:: const_eval_discriminant_variant) ]
80
- #[ salsa:: cycle( crate :: consteval:: const_eval_discriminant_recover ) ]
80
+ #[ salsa:: cycle( cycle_result = crate :: consteval:: const_eval_discriminant_cycle_result ) ]
81
81
fn const_eval_discriminant ( & self , def : EnumVariantId ) -> Result < i128 , ConstEvalError > ;
82
82
83
83
#[ salsa:: invoke( crate :: method_resolution:: lookup_impl_method_query) ]
@@ -91,7 +91,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
91
91
// endregion:mir
92
92
93
93
#[ salsa:: invoke( crate :: layout:: layout_of_adt_query) ]
94
- #[ salsa:: cycle( crate :: layout:: layout_of_adt_recover ) ]
94
+ #[ salsa:: cycle( cycle_result = crate :: layout:: layout_of_adt_cycle_result ) ]
95
95
fn layout_of_adt (
96
96
& self ,
97
97
def : AdtId ,
@@ -100,7 +100,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
100
100
) -> Result < Arc < Layout > , LayoutError > ;
101
101
102
102
#[ salsa:: invoke( crate :: layout:: layout_of_ty_query) ]
103
- #[ salsa:: cycle( crate :: layout:: layout_of_ty_recover ) ]
103
+ #[ salsa:: cycle( cycle_result = crate :: layout:: layout_of_ty_cycle_result ) ]
104
104
fn layout_of_ty ( & self , ty : Ty , env : Arc < TraitEnvironment > ) -> Result < Arc < Layout > , LayoutError > ;
105
105
106
106
#[ salsa:: invoke( crate :: layout:: target_data_layout_query) ]
@@ -113,8 +113,8 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
113
113
#[ salsa:: transparent]
114
114
fn ty ( & self , def : TyDefId ) -> Binders < Ty > ;
115
115
116
- #[ salsa:: cycle( crate :: lower:: type_for_type_alias_with_diagnostics_query_recover) ]
117
116
#[ salsa:: invoke( crate :: lower:: type_for_type_alias_with_diagnostics_query) ]
117
+ #[ salsa:: cycle( cycle_result = crate :: lower:: type_for_type_alias_with_diagnostics_cycle_result) ]
118
118
fn type_for_type_alias_with_diagnostics ( & self , def : TypeAliasId ) -> ( Binders < Ty > , Diagnostics ) ;
119
119
120
120
/// Returns the type of the value of the given constant, or `None` if the `ValueTyDefId` is
@@ -123,7 +123,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
123
123
fn value_ty ( & self , def : ValueTyDefId ) -> Option < Binders < Ty > > ;
124
124
125
125
#[ salsa:: invoke( crate :: lower:: impl_self_ty_with_diagnostics_query) ]
126
- #[ salsa:: cycle( crate :: lower:: impl_self_ty_with_diagnostics_recover ) ]
126
+ #[ salsa:: cycle( cycle_result = crate :: lower:: impl_self_ty_with_diagnostics_cycle_result ) ]
127
127
fn impl_self_ty_with_diagnostics ( & self , def : ImplId ) -> ( Binders < Ty > , Diagnostics ) ;
128
128
129
129
#[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
@@ -165,7 +165,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
165
165
fn type_alias_impl_traits ( & self , def : TypeAliasId ) -> Option < Arc < Binders < ImplTraits > > > ;
166
166
167
167
#[ salsa:: invoke( crate :: lower:: generic_predicates_for_param_query) ]
168
- #[ salsa:: cycle( crate :: lower:: generic_predicates_for_param_recover ) ]
168
+ #[ salsa:: cycle( cycle_result = crate :: lower:: generic_predicates_for_param_cycle_result ) ]
169
169
fn generic_predicates_for_param (
170
170
& self ,
171
171
def : GenericDefId ,
@@ -194,7 +194,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
194
194
fn trait_environment ( & self , def : GenericDefId ) -> Arc < TraitEnvironment > ;
195
195
196
196
#[ salsa:: invoke( crate :: lower:: generic_defaults_with_diagnostics_query) ]
197
- #[ salsa:: cycle( crate :: lower:: generic_defaults_with_diagnostics_recover ) ]
197
+ #[ salsa:: cycle( cycle_result = crate :: lower:: generic_defaults_with_diagnostics_cycle_result ) ]
198
198
fn generic_defaults_with_diagnostics (
199
199
& self ,
200
200
def : GenericDefId ,
@@ -282,7 +282,10 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
282
282
fn adt_variance ( & self , adt_id : AdtId ) -> chalk_db:: Variances ;
283
283
284
284
#[ salsa:: invoke( crate :: variance:: variances_of) ]
285
- #[ salsa:: cycle( crate :: variance:: variances_of_cycle) ]
285
+ #[ salsa:: cycle(
286
+ cycle_fn = crate :: variance:: variances_of_cycle_fn,
287
+ cycle_initial = crate :: variance:: variances_of_cycle_initial,
288
+ ) ]
286
289
fn variances_of ( & self , def : GenericDefId ) -> Option < Arc < [ crate :: variance:: Variance ] > > ;
287
290
288
291
#[ salsa:: invoke( chalk_db:: associated_ty_value_query) ]
@@ -317,7 +320,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
317
320
) -> chalk_ir:: ProgramClauses < Interner > ;
318
321
319
322
#[ salsa:: invoke( crate :: drop:: has_drop_glue) ]
320
- #[ salsa:: cycle( crate :: drop:: has_drop_glue_recover ) ]
323
+ #[ salsa:: cycle( cycle_result = crate :: drop:: has_drop_glue_cycle_result ) ]
321
324
fn has_drop_glue ( & self , ty : Ty , env : Arc < TraitEnvironment > ) -> DropGlue ;
322
325
}
323
326
0 commit comments