salsa/tests/compile-fail/invalid_update_with.rs
Lukas Wirth 8528bab609
Some checks failed
Release-plz / Release-plz PR (push) Has been cancelled
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
feat: Update derive field overwrite support (#747)
* `Update` derive field overwrite support

* Allow overwriting tracked struct field update functions
2025-06-13 17:17:39 +00:00

19 lines
422 B
Rust

#[derive(salsa::Update)]
struct S2 {
#[update(unsafe(with(my_wrong_update)))]
bad: i32,
#[update(unsafe(with(my_wrong_update2)))]
bad2: i32,
#[update(unsafe(with(my_wrong_update3)))]
bad3: i32,
#[update(unsafe(with(true)))]
bad4: &'static str,
}
fn my_wrong_update() {}
fn my_wrong_update2(_: (), _: ()) -> bool {
true
}
fn my_wrong_update3(_: *mut i32, _: i32) -> () {}
fn main() {}