fix: Fix phantom data usage in salsa structs affecting auto traits (#932)
Some checks failed
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled

This commit is contained in:
Lukas Wirth 2025-07-04 22:47:07 +02:00 committed by GitHub
parent fc00eba89e
commit d28d66bf13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -81,7 +81,7 @@ macro_rules! setup_interned_struct {
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
$vis struct $Struct< $($db_lt_arg)? >(
$Id,
std::marker::PhantomData < & $interior_lt salsa::plumbing::interned::Value <$StructWithStatic> >
std::marker::PhantomData<fn() -> &$interior_lt ()>
);
#[allow(clippy::all)]

View file

@ -99,7 +99,7 @@ macro_rules! setup_tracked_fn {
#[derive(Copy, Clone)]
struct $InternedData<$db_lt>(
salsa::Id,
std::marker::PhantomData<&$db_lt $zalsa::interned::Value<$Configuration>>,
std::marker::PhantomData<fn() -> &$db_lt ()>,
);
static $INTERN_CACHE: $zalsa::IngredientCache<$zalsa::interned::IngredientImpl<$Configuration>> =

View file

@ -104,7 +104,7 @@ macro_rules! setup_tracked_struct {
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
$vis struct $Struct<$db_lt>(
salsa::Id,
std::marker::PhantomData < & $db_lt salsa::plumbing::tracked_struct::Value < $Struct<'static> > >
std::marker::PhantomData<fn() -> &$db_lt ()>
);
#[allow(clippy::all)]