Unable to expect
the missing_panics_doc
and missing_errors_doc
lints on main function
#14491
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
My code base denies
clippy::missing_panics_doc
,clippy::missing_errors_doc
andclippy::allow_attributes
globally. However I also have a pub main function that doesn't need documentation.If I use
expect
to allow the first two onmain
, clippy complains that the lint is unfulfilled - even though it has stopped complaining about the missing docs.Everything works fine on functions that aren't
main
.Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=acbdff6f05c01e67eee4ad557ff6e06a
Reproducer
I tried this code:
I expected to see this happen:
No complaints from clippy
Instead, this happened:
Clippy complains about unfulfilled lints
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: