File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ pub trait HirDatabase: DefDatabase {
41
41
fn callable_item_signature ( & self , def : CallableDef ) -> FnSig ;
42
42
43
43
#[ salsa:: invoke( crate :: lower:: generic_predicates_for_param_query) ]
44
+ #[ salsa:: cycle( crate :: lower:: generic_predicates_for_param_recover) ]
44
45
fn generic_predicates_for_param (
45
46
& self ,
46
47
def : GenericDefId ,
Original file line number Diff line number Diff line change @@ -532,6 +532,15 @@ pub(crate) fn generic_predicates_for_param_query(
532
532
. collect ( )
533
533
}
534
534
535
+ pub ( crate ) fn generic_predicates_for_param_recover (
536
+ _db : & impl HirDatabase ,
537
+ _cycle : & [ String ] ,
538
+ _def : & GenericDefId ,
539
+ _param_idx : & u32 ,
540
+ ) -> Arc < [ GenericPredicate ] > {
541
+ Arc :: new ( [ ] )
542
+ }
543
+
535
544
impl TraitEnvironment {
536
545
pub fn lower ( db : & impl HirDatabase , resolver : & Resolver ) -> Arc < TraitEnvironment > {
537
546
let predicates = resolver
Original file line number Diff line number Diff line change @@ -4718,10 +4718,6 @@ fn test() {
4718
4718
}
4719
4719
4720
4720
#[ test]
4721
- // FIXME this is currently a Salsa panic; it would be nicer if it just returned
4722
- // in Unknown, and we should be able to do that once Salsa allows us to handle
4723
- // the cycle. But at least it doesn't overflow for now.
4724
- #[ should_panic]
4725
4721
fn unselected_projection_in_trait_env_cycle_1 ( ) {
4726
4722
let t = type_at (
4727
4723
r#"
@@ -4742,10 +4738,6 @@ fn test<T: Trait>() where T: Trait2<T::Item> {
4742
4738
}
4743
4739
4744
4740
#[ test]
4745
- // FIXME this is currently a Salsa panic; it would be nicer if it just returned
4746
- // in Unknown, and we should be able to do that once Salsa allows us to handle
4747
- // the cycle. But at least it doesn't overflow for now.
4748
- #[ should_panic]
4749
4741
fn unselected_projection_in_trait_env_cycle_2 ( ) {
4750
4742
let t = type_at (
4751
4743
r#"
You can’t perform that action at this time.
0 commit comments