mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-11-24 20:20:26 +00:00
20 lines
419 B
Rust
20 lines
419 B
Rust
//! Test that `specify` does not work if the key is a `salsa::interned`
|
|
//! compilation fails
|
|
#![allow(warnings)]
|
|
|
|
#[salsa::interned]
|
|
struct MyInterned<'db> {
|
|
field: u32,
|
|
}
|
|
|
|
#[salsa::tracked]
|
|
struct MyTracked<'db> {
|
|
field: u32,
|
|
}
|
|
|
|
#[salsa::tracked(specify)]
|
|
fn tracked_fn<'db>(db: &'db dyn salsa::Database, input: MyInterned<'db>) -> MyTracked<'db> {
|
|
MyTracked::new(db, input.field(db) * 2)
|
|
}
|
|
|
|
fn main() {}
|