rust: pin-init: support tuple structs
Status from this message: Applied to pin-init-next.
Get series with b4
b4 am [email protected] change-id 20260904-tuple-struct-5b5b6e6a75f9Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | rust: pin-init: internal: extract utility code to new modulerust/ rust/ rust/ | +33 | 0 replies | |
| 2/4 | rust: pin-init: internal: pin_data: support tuple struct projectionsrust/ rust/ rust/ | +130 | 0 replies | |
| 3/4 | rust: pin-init: internal: init: support tuple structs in `[pin_]init!`rust/ rust/ | +95 | 0 replies | |
| 4/4 | rust: pin-init: internal: init: support tuple struct constructor syntaxrust/ rust/ rust/ | +383 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] rust: pin-init: support tuple structs
This is a long requested feature to support tuple structs. There are a few cases that structs have to be converted to become normal structs so pin-init can be used.
This series add tuple struct support as you'd expect to work. A caveat is that pinned initialization syntax (<-) only works with struct expression initializers. So
#[pin_data]
struct Foo<T>(#[pin] T, usize)would need
pin_init!(Foo {
0 <- expr,
1: 0
})This is to avoid introducing new syntax.
The upstream pull request for this series is
https://github.com/Rust-for-Linux/pin-init/pull/155
---
Gary Guo (1):
rust: pin-init: internal: extract utility code to new module
Mohamad Alsadhan (3):
rust: pin-init: internal: pin_data: support tuple struct projections
rust: pin-init: internal: init: support tuple structs in [pin_]init!
rust: pin-init: internal: init: support tuple struct constructor syntax
rust/pin-init/internal/src/init.rs | 494 ++++++++++++++++++++++++++++----- rust/pin-init/internal/src/lib.rs | 12 +- rust/pin-init/internal/src/pin_data.rs | 129 ++++++--- rust/pin-init/internal/src/util.rs | 54 ++++ rust/pin-init/src/lib.rs | 71 ++++- 5 files changed, 638 insertions(+), 122 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260904-tuple-struct-5b5b6e6a75f9
Best regards,
Signature · 1 line
Gary Guo <[email protected]>