summaryrefslogtreecommitdiff
path: root/rust/kernel/workqueue.rs
diff options
context:
space:
mode:
authorBenno Lossin <lossin@kernel.org>2025-09-05 16:05:31 +0200
committerBenno Lossin <lossin@kernel.org>2025-09-11 23:26:44 +0200
commit1fa516794fdd27b96cee77f8b12ac916b8b6a9a7 (patch)
treea851aa6a8fa5e27a3bc49f96588ef6db0822867a /rust/kernel/workqueue.rs
parent619db96daf942dad974c6c8157ed06d52f7bb969 (diff)
rust: pin-init: add code blocks to `[try_][pin_]init!` macros
Allow writing `_: { /* any number of statements */ }` in initializers to run arbitrary code during initialization. try_init!(MyStruct { _: { if check_something() { return Err(MyError); } }, foo: Foo::new(val), _: { println!("successfully initialized `MyStruct`"); }, }) Tested-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Benno Lossin <lossin@kernel.org>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions