@@ -36,14 +36,14 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
3636 // region:mir
3737
3838 #[ 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 ) ]
4040 fn mir_body ( & self , def : DefWithBodyId ) -> Result < Arc < MirBody > , MirLowerError > ;
4141
4242 #[ salsa:: invoke( crate :: mir:: mir_body_for_closure_query) ]
4343 fn mir_body_for_closure ( & self , def : InternedClosureId ) -> Result < Arc < MirBody > , MirLowerError > ;
4444
4545 #[ 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 ) ]
4747 fn monomorphized_mir_body (
4848 & self ,
4949 def : DefWithBodyId ,
@@ -64,7 +64,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
6464 fn borrowck ( & self , def : DefWithBodyId ) -> Result < Arc < [ BorrowckResult ] > , MirLowerError > ;
6565
6666 #[ 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 ) ]
6868 fn const_eval (
6969 & self ,
7070 def : GeneralConstId ,
@@ -73,11 +73,11 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
7373 ) -> Result < Const , ConstEvalError > ;
7474
7575 #[ 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 ) ]
7777 fn const_eval_static ( & self , def : StaticId ) -> Result < Const , ConstEvalError > ;
7878
7979 #[ 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 ) ]
8181 fn const_eval_discriminant ( & self , def : EnumVariantId ) -> Result < i128 , ConstEvalError > ;
8282
8383 #[ salsa:: invoke( crate :: method_resolution:: lookup_impl_method_query) ]
@@ -91,7 +91,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
9191 // endregion:mir
9292
9393 #[ 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 ) ]
9595 fn layout_of_adt (
9696 & self ,
9797 def : AdtId ,
@@ -100,7 +100,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
100100 ) -> Result < Arc < Layout > , LayoutError > ;
101101
102102 #[ 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 ) ]
104104 fn layout_of_ty ( & self , ty : Ty , env : Arc < TraitEnvironment > ) -> Result < Arc < Layout > , LayoutError > ;
105105
106106 #[ salsa:: invoke( crate :: layout:: target_data_layout_query) ]
@@ -113,8 +113,8 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
113113 #[ salsa:: transparent]
114114 fn ty ( & self , def : TyDefId ) -> Binders < Ty > ;
115115
116- #[ salsa:: cycle( crate :: lower:: type_for_type_alias_with_diagnostics_query_recover) ]
117116 #[ 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) ]
118118 fn type_for_type_alias_with_diagnostics ( & self , def : TypeAliasId ) -> ( Binders < Ty > , Diagnostics ) ;
119119
120120 /// 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 {
123123 fn value_ty ( & self , def : ValueTyDefId ) -> Option < Binders < Ty > > ;
124124
125125 #[ 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 ) ]
127127 fn impl_self_ty_with_diagnostics ( & self , def : ImplId ) -> ( Binders < Ty > , Diagnostics ) ;
128128
129129 #[ salsa:: invoke( crate :: lower:: impl_self_ty_query) ]
@@ -165,7 +165,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
165165 fn type_alias_impl_traits ( & self , def : TypeAliasId ) -> Option < Arc < Binders < ImplTraits > > > ;
166166
167167 #[ 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 ) ]
169169 fn generic_predicates_for_param (
170170 & self ,
171171 def : GenericDefId ,
@@ -194,7 +194,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
194194 fn trait_environment ( & self , def : GenericDefId ) -> Arc < TraitEnvironment > ;
195195
196196 #[ 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 ) ]
198198 fn generic_defaults_with_diagnostics (
199199 & self ,
200200 def : GenericDefId ,
@@ -282,7 +282,10 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
282282 fn adt_variance ( & self , adt_id : AdtId ) -> chalk_db:: Variances ;
283283
284284 #[ 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+ ) ]
286289 fn variances_of ( & self , def : GenericDefId ) -> Option < Arc < [ crate :: variance:: Variance ] > > ;
287290
288291 #[ salsa:: invoke( chalk_db:: associated_ty_value_query) ]
@@ -317,7 +320,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
317320 ) -> chalk_ir:: ProgramClauses < Interner > ;
318321
319322 #[ 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 ) ]
321324 fn has_drop_glue ( & self , ty : Ty , env : Arc < TraitEnvironment > ) -> DropGlue ;
322325}
323326
0 commit comments