@@ -94,6 +94,7 @@ enum MaybeChangedSinceProbeState<G> {
94
94
impl < Q > Slot < Q >
95
95
where
96
96
Q : QueryFunction ,
97
+ Q :: Value : Eq ,
97
98
{
98
99
pub ( super ) fn new ( database_key_index : DatabaseKeyIndex ) -> Self {
99
100
Self {
@@ -270,7 +271,7 @@ where
270
271
// used to be, that is a "breaking change" that our
271
272
// consumers must be aware of. Becoming *more* durable
272
273
// 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 {
274
275
debug ! (
275
276
"read_upgrade({:?}): value is equal, back-dating to {:?}" ,
276
277
self , old_memo. revisions. changed_at,
@@ -550,6 +551,7 @@ where
550
551
struct PanicGuard < ' me , Q >
551
552
where
552
553
Q : QueryFunction ,
554
+ Q :: Value : Eq ,
553
555
{
554
556
slot : & ' me Slot < Q > ,
555
557
runtime : & ' me Runtime ,
@@ -558,6 +560,7 @@ where
558
560
impl < ' me , Q > PanicGuard < ' me , Q >
559
561
where
560
562
Q : QueryFunction ,
563
+ Q :: Value : Eq ,
561
564
{
562
565
fn new ( slot : & ' me Slot < Q > , runtime : & ' me Runtime ) -> Self {
563
566
Self { slot, runtime }
@@ -616,6 +619,7 @@ Please report this bug to https://github.com/salsa-rs/salsa/issues."
616
619
impl < ' me , Q > Drop for PanicGuard < ' me , Q >
617
620
where
618
621
Q : QueryFunction ,
622
+ Q :: Value : Eq ,
619
623
{
620
624
fn drop ( & mut self ) {
621
625
if std:: thread:: panicking ( ) {
0 commit comments