salsa/tests/compile-fail/tracked_impl_incompatibles.rs

55 lines
1.2 KiB
Rust
Raw Normal View History

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