Skip to content

Commit

Permalink
Add todo! & unimplemented! to format macros list (#14266)
Browse files Browse the repository at this point in the history
For some reason, the `todo!` and `unimplemented!` macros were not
included in the list of format-supporting macros list. Since they seem
to behave exactly the same as all others like `write!` and `assert!`,
adding them now.

I wonder if we should delete the `FORMAT_MACRO_DIAG_ITEMS`, and instead
tag all macros with the `#[clippy::format_args]`?

changelog: all format-handling lints will now validate `todo!` and
`unimplemented!` macros.
  • Loading branch information
blyxyas authored Feb 24, 2025
2 parents 0fb004d + 373f809 commit 162b0e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clippy_utils/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const FORMAT_MACRO_DIAG_ITEMS: &[Symbol] = &[
sym::print_macro,
sym::println_macro,
sym::std_panic_macro,
sym::todo_macro,
sym::unimplemented_macro,
sym::write_macro,
sym::writeln_macro,
];
Expand Down

0 comments on commit 162b0e8

Please sign in to comment.