#![warn(clippy::inherent_to_string)]
-#![deny(clippy::inherent_to_string_shadow)]
+#![deny(clippy::inherent_to_string_shadow_display)]
+#![allow(clippy::many_single_char_names)]
use std::fmt;
struct C;
struct D;
struct E;
+struct F;
impl A {
// Should be detected; emit warning
}
}
+impl F {
+ // Should not be detected, as it does not match the function signature
+ fn to_string(&self, _i: i32) -> String {
+ "F.to_string()".to_string()
+ }
+}
+
fn main() {
let a = A;
a.to_string();
d.to_string();
E::to_string();
+
+ let f = F;
+ f.to_string(1);
}