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 cfgs in rustdoc #1055

Closed
Tracked by #671
joshlf opened this issue Mar 18, 2024 · 2 comments
Closed
Tracked by #671

Fix cfgs in rustdoc #1055

joshlf opened this issue Mar 18, 2024 · 2 comments
Labels
experience-easy This issue is easy, and shouldn't require much experience help wanted Extra attention is needed

Comments

@joshlf
Copy link
Member

joshlf commented Mar 18, 2024

FromZeros::new_vec_zeroed has the wrong cfg rendered on docs.rs:

image

We emit the wrong doc_cfg attribute:

zerocopy/src/lib.rs

Lines 1943 to 1946 in 2bec60b

#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
#[inline(always)]
fn new_vec_zeroed(len: usize) -> Vec<Self>

We should fix this and also figure out whether there are other incorrect doc_cfg items to fix while we're here.

Mentoring instructions

Find and fix any instance of doc_cfg that doesn't match the corresponding cfg attribute.

@joshlf joshlf mentioned this issue Mar 18, 2024
87 tasks
@joshlf joshlf added help wanted Extra attention is needed experience-easy This issue is easy, and shouldn't require much experience labels Mar 19, 2024
@whee
Copy link

whee commented Apr 6, 2024

FWIW, I looked at the state of doc_cfg items in main at 5b99dc3 and did not see any mismatches anywhere.

The item mentioned here was fixed in e56a42b.

@joshlf
Copy link
Member Author

joshlf commented Apr 30, 2024

Huh, seems you're right. Cool.

@joshlf joshlf closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experience-easy This issue is easy, and shouldn't require much experience help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants