Skip to content

Commit 162b0e8

Browse files
authored
Add todo! & unimplemented! to format macros list (#14266)
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.
2 parents 0fb004d + 373f809 commit 162b0e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_utils/src/macros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const FORMAT_MACRO_DIAG_ITEMS: &[Symbol] = &[
3030
sym::print_macro,
3131
sym::println_macro,
3232
sym::std_panic_macro,
33+
sym::todo_macro,
34+
sym::unimplemented_macro,
3335
sym::write_macro,
3436
sym::writeln_macro,
3537
];

0 commit comments

Comments
 (0)