You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attribute #[profiling::function] is set on a function, the lint missing_errors_doc trigger any warning even if the function can return an error and possible returned Errors is not documented.
While just remove the attribute allow to have report of the missing Error doc again.
Lint Name
missing_errors_doc
Reproduce
trigger the lint as expected
/// Divide 100 by the value indicated/// => Reference which trigger the lint.pubfndiv_hundred_by(value:u32) -> Result<u32,Error>{if value == 0{returnErr(Error::DivByZero);}Ok(100 / value)}
don't trigger the lint
/// Divide 1000 by the value indicated/// => variation with marker `#[profiling::function]` added.#[profiling::function]pubfndiv_thousand_by(value:u32) -> Result<u32,Error>{if value == 0{returnErr(Error::DivByZero);}Ok(1000 / value)}
Summary
When attribute
#[profiling::function]
is set on a function, the lintmissing_errors_doc
trigger any warning even if the function can return an error and possible returnedErrors
is not documented.While just remove the attribute allow to have report of the missing
Error
doc again.Lint Name
missing_errors_doc
Reproduce
trigger the lint as expected
don't trigger the lint
A demo project is available here : https://github.com/gwen-lg/clippy-lints-doc-tests
The text was updated successfully, but these errors were encountered: