Lint about usage of format!("string literal")
This commit is contained in:
parent
222086d62b
commit
ef4401d4ac
4 changed files with 55 additions and 1 deletions
11
tests/compile-fail/format.rs
Executable file
11
tests/compile-fail/format.rs
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#![feature(plugin)]
|
||||
#![plugin(clippy)]
|
||||
#![deny(useless_format)]
|
||||
|
||||
fn main() {
|
||||
format!("foo"); //~ERROR useless use of `format!`
|
||||
format!("foo {}", 42);
|
||||
|
||||
println!("foo");
|
||||
println!("foo {}", 42);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue