mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-10-23 04:46:35 +00:00
Update components/salsa-macro-rules/src/setup_interned_struct.rs
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
This commit is contained in:
parent
1e18334672
commit
dcdf4d774d
1 changed files with 6 additions and 1 deletions
|
@ -67,7 +67,12 @@ macro_rules! setup_interned_struct {
|
|||
|
||||
type StructData<$db_lt> = ($($field_ty,)*);
|
||||
|
||||
struct StructKey<$db_lt, $($indexed_ty: $zalsa::interned::Lookup<$field_ty>),*>($($indexed_ty,)* std::marker::PhantomData<&$db_lt ()>,);
|
||||
/// Key to use during hash lookups. Each field is some type that implements `Lookup<T>`
|
||||
/// for the owned type. This permits interning with an `&str` when a `String` is required and so forth.
|
||||
struct StructKey<$db_lt, $($indexed_ty: $zalsa::interned::Lookup<$field_ty>),*>(
|
||||
$($indexed_ty,)*
|
||||
std::marker::PhantomData<&$db_lt ()>,
|
||||
);
|
||||
|
||||
impl<$db_lt, $($indexed_ty: $zalsa::interned::Lookup<$field_ty>),*> $zalsa::interned::Lookup<StructData<$db_lt>>
|
||||
for StructKey<$db_lt, $($indexed_ty),*> {
|
||||
|
|
Loading…
Reference in a new issue