Patch "rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`" has been added to the 7.1-stable tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Sasha Levin
This is a note to let you know that I've just added the patch titled
rust: pin-init: internal: suppress
non_snake_caselint in[pin_]init!to the 7.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
Quoted 6 lines
The filename of the patch is:
rust-pin-init-internal-suppress-non_snake_case-lint-.patch
and it can be found in the queue-7.1 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Hi Sasha,
Looks like quite a lot of patches have been picked up as dependency in order to pick this to 7.1.
The warning that this fix addresses are already worked around on the user side, so it probably isn't worth backporting.
Best,
Gary
Quoted 43 lines
commit
54db70c2ed9fb176f2f097a04c55b67071dc0db7Author: Mirko Adzic <[email protected]> Date: Wed May 27 18:19:54 2026 +0100rust: pin-init: internal: suppress
non_snake_caselint in[pin_]init![ Upstream commit
5423ef9d4db852835746001d0840231227bb0e39]Allows
non_snake_caselint on local variables generated in[pin_]init!.Conceptually the identifiers in
[pin_]init!just references the field names, and are not defining them, so the warning should not be generated, similar to how constructing a struct with non-snake-case field names do no generate these warnings.Reported-by Gary Guo <[email protected]>Fixes 42415d163e5d ("rust: pin-init: add references to previously initialized fields")Signed-off-by Mirko Adzic <[email protected]>[ Reworded commit message - Gary ]Signed-off-by Gary Guo <[email protected]>Signed-off-by Sasha Levin <[email protected]>rust/pin-init/internal/src/init.rs +3
-1@@ -307,7 +307,9 @@ fn init_fields( #init #(#cfgs)* -#[allow(unused_variables)] +// Allow `non_snake_case` since the same warning is going to be reported for the struct +// field. +#[allow(unused_variables, non_snake_case)] let #ident = #guard.let_binding(); });
Sasha Levin
maintainerQuoted 5 lines · Gary Guo
Looks like quite a lot of patches have been picked up as dependency in order to pick this to 7.1.
The warning that this fix addresses are already worked around on the user side, so it probably isn't worth backporting.
Dropped from the 7.1 queue along with the following dependencies:
- rust: pin-init: internal: remove redundant pin filtering
- rust: pin-init: internal: turn PhantomPinned error into a warning
- rust: pin-init: internal: remove collect_tuple polyfill
- rust: pin-init: internal: pin_data: use closure for handling
- rust: pin-init: internal: pin_data: add struct to record
- rust: pin-init: internal: init: handle code blocks early
- rust: pin-init: internal: use marker on drop guard type for pinned fields
- rust: pin-init: internal: project slots instead of references
Thanks for the report!
Signature · 2 lines
Thanks, Sasha