mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-07-07 21:35:17 +00:00

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
* `Update` derive field overwrite support * Allow overwriting tracked struct field update functions
19 lines
422 B
Rust
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() {}
|