2 Checks for usage of `.to_string()` on an `&&T` where
3 `T` implements `ToString` directly (like `&&str` or `&&String`).
6 This bypasses the specialized implementation of
7 `ToString` and instead goes through the more expensive string formatting
12 // Generic implementation for `T: Display` is used (slow)
13 ["foo", "bar"].iter().map(|s| s.to_string());
15 // OK, the specialized impl is used
16 ["foo", "bar"].iter().map(|&s| s.to_string());