@@ -94,6 +94,7 @@ enum MaybeChangedSinceProbeState<G> {
9494impl < Q > Slot < Q >
9595where
9696 Q : QueryFunction ,
97+ Q :: Value : Eq ,
9798{
9899 pub ( super ) fn new ( database_key_index : DatabaseKeyIndex ) -> Self {
99100 Self {
@@ -270,7 +271,7 @@ where
270271 // used to be, that is a "breaking change" that our
271272 // consumers must be aware of. Becoming *more* durable
272273 // is not. See the test `constant_to_non_constant`.
273- if revisions. durability >= old_memo. revisions . durability {
274+ if revisions. durability >= old_memo. revisions . durability && old_memo . value == value {
274275 debug ! (
275276 "read_upgrade({:?}): value is equal, back-dating to {:?}" ,
276277 self , old_memo. revisions. changed_at,
@@ -550,6 +551,7 @@ where
550551struct PanicGuard < ' me , Q >
551552where
552553 Q : QueryFunction ,
554+ Q :: Value : Eq ,
553555{
554556 slot : & ' me Slot < Q > ,
555557 runtime : & ' me Runtime ,
@@ -558,6 +560,7 @@ where
558560impl < ' me , Q > PanicGuard < ' me , Q >
559561where
560562 Q : QueryFunction ,
563+ Q :: Value : Eq ,
561564{
562565 fn new ( slot : & ' me Slot < Q > , runtime : & ' me Runtime ) -> Self {
563566 Self { slot, runtime }
@@ -616,6 +619,7 @@ Please report this bug to https://github.com/salsa-rs/salsa/issues."
616619impl < ' me , Q > Drop for PanicGuard < ' me , Q >
617620where
618621 Q : QueryFunction ,
622+ Q :: Value : Eq ,
619623{
620624 fn drop ( & mut self ) {
621625 if std:: thread:: panicking ( ) {
0 commit comments