diff options
author | 2025-03-08 11:04:30 +0000 | |
---|---|---|
committer | 2025-03-16 21:59:18 +0100 | |
commit | 578eb8b6db13cd923f1ffa80b9e8d32dcc06d35d (patch) | |
tree | f12f5ac1981bc7837549d5c54c85625b21cd3e5f /scripts/generate_rust_analyzer.py | |
parent | rust: pin-init: call `try_[pin_]init!` from `[pin_]init!` instead of `__init_internal!` (diff) | |
download | wireguard-linux-578eb8b6db13cd923f1ffa80b9e8d32dcc06d35d.tar.xz wireguard-linux-578eb8b6db13cd923f1ffa80b9e8d32dcc06d35d.zip |
rust: pin-init: move the default error behavior of `try_[pin_]init`
Move the ability to just write `try_pin_init!(Foo { a <- a_init })`
(note the missing `? Error` at the end) into the kernel crate.
Remove this notation from the pin-init crate, since the default when no
error is specified is the kernel-internal `Error` type. Instead add two
macros in the kernel crate that serve this default and are used instead
of the ones from `pin-init`.
This is done, because the `Error` type that is used as the default is
from the kernel crate and it thus prevents making the pin-init crate
standalone.
In order to not cause a build error due to a name overlap, the macros in
the pin-init crate are renamed, but this change is reverted in a future
commit when it is a standalone crate.
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250308110339.2997091-8-benno.lossin@proton.me
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions