rust-clippy/tests/compile-fail/format.rs

12 lines
210 B
Rust
Raw Normal View History

#![feature(plugin)]
#![plugin(clippy)]
#![deny(useless_format)]
fn main() {
format!("foo"); //~ERROR useless use of `format!`
format!("foo {}", 42);
println!("foo");
println!("foo {}", 42);
}