2 Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait.
5 This method is also implicitly defined if a type implements the `Display` trait. The less versatile inherent method will then shadow the implementation introduced by `Display`.
14 pub fn to_string(&self) -> String {
19 impl fmt::Display for A {
20 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
21 write!(f, "I am A, too")
32 impl fmt::Display for A {
33 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {