]> git.lizzy.rs Git - rust.git/blob - tests/ui/inherent_to_string.stderr
Downgrade many_single_char_names to pedantic
[rust.git] / tests / ui / inherent_to_string.stderr
1 error: implementation of inherent method `to_string(&self) -> String` for type `A`
2   --> $DIR/inherent_to_string.rs:20:5
3    |
4 LL | /     fn to_string(&self) -> String {
5 LL | |         "A.to_string()".to_string()
6 LL | |     }
7    | |_____^
8    |
9    = note: `-D clippy::inherent-to-string` implied by `-D warnings`
10    = help: implement trait `Display` for type `A` instead
11
12 error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
13   --> $DIR/inherent_to_string.rs:44:5
14    |
15 LL | /     fn to_string(&self) -> String {
16 LL | |         "C.to_string()".to_string()
17 LL | |     }
18    | |_____^
19    |
20 note: the lint level is defined here
21   --> $DIR/inherent_to_string.rs:2:9
22    |
23 LL | #![deny(clippy::inherent_to_string_shadow_display)]
24    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25    = help: remove the inherent method from type `C`
26
27 error: aborting due to 2 previous errors
28