Add undocumented_as_casts lint#16682
Conversation
|
rustbot has assigned @samueltardieu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Lintcheck changes for 27a4bdd
This comment will be updated if you push new changes |
| /// ``` | ||
| #[clippy::version = "1.96.0"] | ||
| pub UNDOCUMENTED_AS_CASTS, | ||
| nursery, |
There was a problem hiding this comment.
If the lint has no known bug, please use restriction instead of nursery.
| #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] | ||
| span_lint_and_then( |
There was a problem hiding this comment.
Why not use span_lint_and_help() instead?
| } | ||
| } | ||
|
|
||
| /// Checks if there is a `// CAST:` or `/* CAST:` comment preceding the cast expression. |
There was a problem hiding this comment.
Wouldn't it be better to share the logic with the "SAFETY" logic? It looks like a lot of duplicated functionalities.
|
Reminder, once the PR becomes ready for a review, use |
|
This lint has been nominated for inclusion. |
Checks for
ascasts that do not have a preceding// CAST:comment.fixes #15963
changelog: new lint: [
undocumented_as_casts]