salsa/tests/compile-fail/tracked_method_incompatibles.rs
Niko Matsakis 68a3a7fceb wip
2024-07-19 08:05:39 -04:00

32 lines
624 B
Rust

#[salsa::tracked]
struct Tracked<'db> {
field: u32,
}
#[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]
impl<'db> Tracked<'db> {
#[salsa::tracked]
fn multiple_lifetimes<'db1>(&mut self, db: &'db1 dyn salsa::Database) {}
}
#[salsa::tracked]
impl<'db> Tracked<'db> {
#[salsa::tracked]
fn type_generics<T>(&mut self, db: &dyn salsa::Database) -> T {
panic!()
}
}
fn main() {}