diff options
| author | Mohamad Alsadhan <mo@sdhn.cc> | 2026-09-04 15:12:31 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2026-09-14 01:36:05 +0100 |
| commit | d48aa955cb91745ef2e5089f9277a7a95060cce3 (patch) | |
| tree | 9ca07697dec4988261eb777f457696b05381cb19 /tools/lib/python/kdoc/python_version.py | |
| parent | 1ee699c4516607c0b594813c9c81da4285ed7d56 (diff) | |
| download | linux-next-d48aa955cb91745ef2e5089f9277a7a95060cce3.tar.gz linux-next-d48aa955cb91745ef2e5089f9277a7a95060cce3.zip | |
rust: pin-init: internal: init: support tuple structs in `[pin_]init!`
Extend the initializer syntax so that a field can be named by an index,
addressing tuple struct fields the same way a struct expression does:
pin_init!(Foo { 0: value, 1 <- initializer })
Tuple fields are not exposed by a `let` binding to the fields after them,
since they have no name to bind; `_0` would shadow a user variable.
Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
[ Fixed incorrect index calculation and cleaned up the code - Gary ]
Link: https://patch.msgid.link/20260904-tuple-struct-v1-3-72c50bd037fd@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
