salsa/tests/tracked_struct_db1_lt.rs

34 lines
478 B
Rust
Raw Normal View History

2024-04-30 01:15:48 +00:00
//! Test that tracked structs with lifetimes not named `'db`
//! compile successfully.
2024-06-18 07:40:21 +00:00
mod common;
2024-04-30 01:15:48 +00:00
use test_log::test;
2024-07-16 10:04:01 +00:00
#[salsa::input]
2024-04-30 01:15:48 +00:00
struct MyInput {
field: u32,
}
2024-07-16 10:04:01 +00:00
#[salsa::tracked]
2024-04-30 01:15:48 +00:00
struct MyTracked1<'db1> {
field: MyTracked2<'db1>,
}
2024-07-16 10:04:01 +00:00
#[salsa::tracked]
2024-04-30 01:15:48 +00:00
struct MyTracked2<'db2> {
field: u32,
}
2024-07-17 12:42:06 +00:00
#[salsa::db]
2024-04-30 01:15:48 +00:00
#[derive(Default)]
struct Database {
storage: salsa::Storage<Self>,
}
2024-07-17 12:42:06 +00:00
#[salsa::db]
2024-04-30 01:15:48 +00:00
impl salsa::Database for Database {}
#[test]
fn create_db() {}