Skip to content

Commit 58e663e

Browse files
y86-devonestacked
authored andcommitted
rust: pin-init: allow pub fields in derive(Zeroable)
Add support for parsing `pub`, `pub(crate)` and `pub(super)` to the derive macro `Zeroable`. Link: Rust-for-Linux/pin-init@e8311e5 Signed-off-by: Benno Lossin <[email protected]>
1 parent 97c0340 commit 58e663e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/pin-init/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ macro_rules! __derive_zeroable {
13931393
@body({
13941394
$(
13951395
$(#[$($field_attr:tt)*])*
1396-
$field:ident : $field_ty:ty
1396+
$field_vis:vis $field:ident : $field_ty:ty
13971397
),* $(,)?
13981398
}),
13991399
) => {

0 commit comments

Comments
 (0)