mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
ff98e3f9f5
Clippy was issuing a warning when `format!` was used inside a macro. That's a problem because macros have different syntax and can be outside the control of the user. This skips the `useless_format` check if the `format!` call is inside a macro.
10 lines
269 B
Text
10 lines
269 B
Text
error: useless use of `format!`
|
|
--> $DIR/format.rs:12:5
|
|
|
|
|
12 | format!("foo");
|
|
| ^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()`
|
|
|
|
|
= note: `-D useless-format` implied by `-D warnings`
|
|
|
|
error: aborting due to previous error
|
|
|