2022-08-26 23:05:35 +00:00
|
|
|
//! Test that `specify` does not work if the key is a `salsa::input`
|
|
|
|
//! compilation fails
|
|
|
|
#![allow(warnings)]
|
|
|
|
|
2024-07-16 10:04:01 +00:00
|
|
|
#[salsa::input]
|
2022-08-26 23:05:35 +00:00
|
|
|
struct MyInput {
|
|
|
|
field: u32,
|
|
|
|
}
|
|
|
|
|
2024-07-16 10:04:01 +00:00
|
|
|
#[salsa::tracked]
|
2024-05-24 01:16:30 +00:00
|
|
|
struct MyTracked<'db> {
|
2022-08-26 23:05:35 +00:00
|
|
|
field: u32,
|
|
|
|
}
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
#[salsa::tracked(specify)]
|
|
|
|
fn tracked_fn<'db>(db: &'db dyn salsa::Database, input: MyInput) -> MyTracked<'db> {
|
2022-08-26 23:05:35 +00:00
|
|
|
MyTracked::new(db, input.field(db) * 2)
|
|
|
|
}
|
|
|
|
|
2022-08-26 23:51:35 +00:00
|
|
|
fn main() {}
|