// run-rustfix
-#![allow(clippy::print_literal)]
+#![allow(clippy::print_literal, clippy::redundant_clone)]
#![warn(clippy::useless_format)]
struct Foo(pub String);
fn main() {
"foo".to_string();
+ "{}".to_string();
+ "{} abc {}".to_string();
+ "foo {}\n\" bar".to_string();
"foo".to_string();
format!("{:?}", "foo"); // Don't warn about `Debug`.
42.to_string();
let x = std::path::PathBuf::from("/bar/foo/qux");
x.display().to_string();
+
+ // False positive
+ let a = "foo".to_string();
+ let _ = Some(a + "bar");
}