salsa 0.27.2

A generic framework for on-demand, incrementalized computation (experimental)
Documentation
//! Compile Singleton struct test:
//!
//! Singleton flags are only allowed for input structs. If applied on any other Salsa struct compilation must fail

#[salsa::input(singleton)]
struct MyInput {
    field: u32,
}

#[salsa::tracked(singleton)]
struct MyTracked<'db> {
    field: &'db str,
}

#[salsa::interned(singleton)]
struct MyInterned<'db> {
    field: &'db str,
}

#[salsa::tracked(singleton)]
fn tracked_fn(db: &dyn salsa::Database, input: MyInput) -> u32 {
    input.field(db)
}

#[salsa::accumulator(singleton)]
struct Integers(u32);

fn main() {}