salsa/tests/tracked_with_intern.rs

32 lines
476 B
Rust
Raw Normal View History

//! Test that a setting a field on a `#[salsa::input]`
//! overwrites and returns the old value.
use test_log::test;
2024-07-17 12:42:06 +00:00
#[salsa::db]
#[derive(Default)]
struct Database {
storage: salsa::Storage<Self>,
}
2024-07-17 12:42:06 +00:00
#[salsa::db]
impl salsa::Database for Database {}
#[salsa::input]
struct MyInput {
field: String,
}
#[salsa::tracked]
struct MyTracked<'db> {
field: MyInterned<'db>,
}
#[salsa::interned]
struct MyInterned<'db> {
field: String,
}
#[test]
fn execute() {}