2022-09-07 19:09:33 +00:00
|
|
|
#[salsa::jar(db = Db)]
|
2024-05-24 01:16:30 +00:00
|
|
|
struct Jar(MyTracked<'_>);
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
|
|
#[salsa::tracked]
|
2024-05-24 01:16:30 +00:00
|
|
|
struct MyTracked<'db> {
|
2022-09-07 19:09:33 +00:00
|
|
|
field: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(return_ref)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
#[salsa::tracked(specify)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(no_eq)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(data = Data)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(db = Db)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(recover_fn = recover)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(lru = 32)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[salsa::tracked(constructor = Constructor)]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for MyTracked<'db> {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
#[salsa::tracked]
|
2024-05-24 01:16:30 +00:00
|
|
|
impl<'db> std::default::Default for [MyTracked<'db>; 12] {
|
|
|
|
fn default() -> Self {}
|
2022-09-07 19:09:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
trait Db: salsa::DbWithJar<Jar> {}
|
|
|
|
|
2024-05-24 01:16:30 +00:00
|
|
|
fn main() {}
|