Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doc_cfg for FromZeroes for Option<Box<T>> #597

Closed
joshlf opened this issue Nov 4, 2023 · 0 comments · Fixed by #599
Closed

Fix doc_cfg for FromZeroes for Option<Box<T>> #597

joshlf opened this issue Nov 4, 2023 · 0 comments · Fixed by #599

Comments

@joshlf
Copy link
Member

joshlf commented Nov 4, 2023

zerocopy/src/lib.rs

Lines 1907 to 1908 in dcadae6

#[cfg(feature = "alloc")]
unsafe_impl!(T => FromZeroes for Option<Box<T>>);

This should have a #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] attribute, but putting it on the macro invocation won't result in it showing up in rustdoc (I tested it). You can see the result here. By contract, here's what it should look like.

joshlf added a commit that referenced this issue Nov 4, 2023
Use the `doc(cfg(...))` syntax in more places when generating
documentation:
- `impl<T> FromZeroes for Option<Box<T>>`
- trait impls for simd types

Release 0.7.26.

Closes #597
github-merge-queue bot pushed a commit that referenced this issue Nov 14, 2023
Use the `doc(cfg(...))` syntax in more places when generating
documentation:
- `impl<T> FromZeroes for Option<Box<T>>`
- trait impls for simd types

Release 0.7.26.

Closes #597
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant