salsa/tests/tracked_with_intern.rs
Niko Matsakis 2213729c4e wip
2024-07-17 08:42:06 -04:00

31 lines
476 B
Rust

//! Test that a setting a field on a `#[salsa::input]`
//! overwrites and returns the old value.
use test_log::test;
#[salsa::db]
#[derive(Default)]
struct Database {
storage: salsa::Storage<Self>,
}
#[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() {}