Skip to content

Commit d18dc77

Browse files
authored
fix: Fix incorrect values_equal signature (#825)
1 parent 445b627 commit d18dc77

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

src/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub trait Configuration: Any {
6161
/// the older one.
6262
///
6363
/// This invokes user code in form of the `Eq` impl.
64-
fn values_equal(old_value: &Self::Output<'_>, new_value: &Self::Output<'_>) -> bool;
64+
fn values_equal<'db>(old_value: &Self::Output<'db>, new_value: &Self::Output<'db>) -> bool;
6565

6666
/// Convert from the id used internally to the value that execute is expecting.
6767
/// This is a no-op if the input to the function is a salsa struct.

src/function/backdate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ where
99
/// If the value/durability of this memo is equal to what is found in `revisions`/`value`,
1010
/// then update `revisions.changed_at` to match `self.revisions.changed_at`. This is invoked
1111
/// on an old memo when a new memo has been produced to check whether there have been changed.
12-
pub(super) fn backdate_if_appropriate(
12+
pub(super) fn backdate_if_appropriate<'db>(
1313
&self,
14-
old_memo: &Memo<C::Output<'_>>,
14+
old_memo: &Memo<C::Output<'db>>,
1515
revisions: &mut QueryRevisions,
16-
value: &C::Output<'_>,
16+
value: &C::Output<'db>,
1717
) {
1818
if let Some(old_value) = &old_memo.value {
1919
// Careful: if the value became less durable than it

src/function/execute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where
2424
&'db self,
2525
db: &'db C::DbView,
2626
mut active_query: ActiveQueryGuard<'db>,
27-
opt_old_memo: Option<&Memo<C::Output<'_>>>,
27+
opt_old_memo: Option<&Memo<C::Output<'db>>>,
2828
) -> &'db Memo<C::Output<'db>> {
2929
let zalsa = db.zalsa();
3030
let revision_now = zalsa.current_revision();

src/update.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ pub fn always_update<T>(
130130
/// have been part of a tracked struct whose values were mutated,
131131
/// thus invalidating the `'db` lifetime (from a stacked borrows perspective).
132132
/// Either way, the `Eq` implementation would be invalid.
133-
#[diagnostic::on_unimplemented(
134-
message = "My Message for `ImportantTrait` implemented for `{Self}`",
135-
label = "My Label",
136-
note = "Note 1",
137-
note = "Note 2"
138-
)]
139133
pub unsafe trait Update {
140134
/// # Returns
141135
///

0 commit comments

Comments
 (0)