salsa/tests/compile-fail/tracked_method_incompatibles.rs

33 lines
624 B
Rust
Raw Normal View History

2024-07-16 10:04:01 +00:00
#[salsa::tracked]
2024-05-24 01:16:30 +00:00
struct Tracked<'db> {
field: u32,
}
2024-07-19 12:05:39 +00:00
#[salsa::tracked]
impl<'db> Tracked<'db> {
#[salsa::tracked]
fn ref_self(&self, db: &dyn salsa::Database) {}
}
#[salsa::tracked]
impl<'db> Tracked<'db> {
#[salsa::tracked]
fn ref_mut_self(&mut self, db: &dyn salsa::Database) {}
}
#[salsa::tracked]
2024-05-24 01:16:30 +00:00
impl<'db> Tracked<'db> {
#[salsa::tracked]
2024-07-19 12:05:39 +00:00
fn multiple_lifetimes<'db1>(&mut self, db: &'db1 dyn salsa::Database) {}
}
2024-07-19 12:05:39 +00:00
#[salsa::tracked]
impl<'db> Tracked<'db> {
#[salsa::tracked]
fn type_generics<T>(&mut self, db: &dyn salsa::Database) -> T {
panic!()
}
}
2024-05-24 01:16:30 +00:00
fn main() {}