-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Clippy tells me to put # Error
section on doc comments for #[doc(hidden)]
function
#11501
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
Comments
Couldn't reproduce this, is that the full file? |
@Alexendoo Oh I am extremely sorry! I assumed too much about this particular error. The code I pasted is actually not reproducing for me either. I just tried to come up with a minimal code sample of the offending code but I failed so far. The code that triggers this bug can be found here: https://github.com/paritytech/wasmi/blob/837bfdb7a0fc668b64a00ef56dd09187ef2ce7b8/crates/wasmi/src/func/into_func.rs#L98 In particular I encountered it in this branch: https://github.com/paritytech/wasmi/blob/9cc4fd7c28c2432082c9a2033c1d226ec819f235/crates/wasmi/src/func/into_func.rs#L98 |
Thanks! That reproduces for me as well |
The reproducer in the original post needed just one extra thing for it to lint - for it to be |
yeah that actually makes sense since otherwise it won't be included in the public docs of a crate anyways. 🤦 glad you figured it out! |
Ignore `#[doc(hidden)]` functions in clippy doc lints Fixes rust-lang#11501 The implementation before #115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly https://github.com/rust-lang/rust/blob/852bf4e51bf260550cd1a280d2146f1c0641b1e8/src/tools/clippy/clippy_lints/src/doc.rs#L526-L529 r? `@flip1995`
Summary
Clippy tells me to write an
# Error
doc section for a function that has hidden its documentation via#[doc(hidden)]
. In my opinion thisclippy
warning thus does not make sense since docs are unavailable anyways.This warning got introduced when I upgraded to the most recent
clippy
nightly. (clippy 0.1.74 (8142a319 2023-09-13)
)Reproducer
I tried this code:
I expected to see this happen: OK
Instead, this happened:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: