summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorBenno Lossin <lossin@kernel.org>2026-01-16 11:54:20 +0100
committerBenno Lossin <lossin@kernel.org>2026-01-17 10:51:42 +0100
commit50426bde1577d17e61362bd199d487dbeb159110 (patch)
tree6e1137e2d86256727110ecacf7fd2366ae4db725 /tools/perf/scripts/python/stackcollapse.py
parent26bd9402389eaebed086755afb03453dcae6617a (diff)
downloadlinux-50426bde1577d17e61362bd199d487dbeb159110.tar.gz
linux-50426bde1577d17e61362bd199d487dbeb159110.zip
rust: pin-init: rewrite `derive(Zeroable)` and `derive(MaybeZeroable)` using `syn`
Rewrite the two derive macros for `Zeroable` using `syn`. One positive side effect of this change is that tuple structs are now supported by them. Additionally, syntax errors and the error emitted when trying to use one of the derive macros on an `enum` are improved. Otherwise no functional changes intended. For example: #[derive(Zeroable)] enum Num { A(u32), B(i32), } Produced this error before this commit: error: no rules expected keyword `enum` --> tests/ui/compile-fail/zeroable/enum.rs:5:1 | 5 | enum Num { | ^^^^ no rules expected this token in macro call | note: while trying to match keyword `struct` --> src/macros.rs | | $vis:vis struct $name:ident | ^^^^^^ Now the error is: error: cannot derive `Zeroable` for an enum --> tests/ui/compile-fail/zeroable/enum.rs:5:1 | 5 | enum Num { | ^^^^ error: cannot derive `Zeroable` for an enum Tested-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Benno Lossin <lossin@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions