Skip to content

Commit e8311e5

Browse files
committed
allow pub fields in derive(Zeroable)
Add support for parsing `pub`, `pub(crate)` and `pub(super)` to the derive macro `Zeroable`. Signed-off-by: Benno Lossin <[email protected]>
1 parent 3488b8b commit e8311e5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Changed
1515

1616
- `InPlaceInit` now only exists when the `alloc` or `std` features are enabled
17+
- added support for visibility in `Zeroable` derive macro
1718

1819
## [0.0.9] - 2024-12-02
1920

src/macros.rs

+1-1
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)