salsa/tests/compile-fail/tracked_impl_incompatibles.rs
2024-06-18 09:40:21 +02:00

54 lines
1.2 KiB
Rust

#[salsa::jar(db = Db)]
struct Jar(MyTracked<'_>);
#[salsa::tracked]
struct MyTracked<'db> {
field: u32,
}
#[salsa::tracked(return_ref)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(specify)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(no_eq)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(data = Data)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(db = Db)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(recover_fn = recover)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(lru = 32)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked(constructor = Constructor)]
impl<'db> std::default::Default for MyTracked<'db> {
fn default() -> Self {}
}
#[salsa::tracked]
impl<'db> std::default::Default for [MyTracked<'db>; 12] {
fn default() -> Self {}
}
trait Db: salsa::DbWithJar<Jar> {}
fn main() {}