salsa/tests/compile-fail/input_struct_incompatibles.rs
CheaterCodes 13a2bd7461
Changed return_ref syntax to returns(as_ref) and returns(cloned) (#772)
* Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)`

* Implement

* renamed module for return_mode

* Rename macro, fix docs, add tests, validate return modes

* Cargo fmt

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2025-05-09 07:28:54 +00:00

25 lines
433 B
Rust

#[salsa::input(returns(ref))]
struct InputWithRetRef(u32);
#[salsa::input(specify)]
struct InputWithSpecify(u32);
#[salsa::input(no_eq)]
struct InputNoWithEq(u32);
#[salsa::input(db = Db)]
struct InputWithDb(u32);
#[salsa::input(recover_fn = recover)]
struct InputWithRecover(u32);
#[salsa::input(lru =12)]
struct InputWithLru(u32);
#[salsa::input]
struct InputWithTrackedField {
#[tracked]
field: u32,
}
fn main() {}