summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/inherent_to_string.stderr
blob: 443fecae1aadfff104a0c884981ca37e23505ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
error: implementation of inherent method `to_string(&self) -> String` for type `A`
  --> $DIR/inherent_to_string.rs:20:5
   |
LL | /     fn to_string(&self) -> String {
LL | |         "A.to_string()".to_string()
LL | |     }
   | |_____^
   |
   = help: implement trait `Display` for type `A` instead
   = note: `-D clippy::inherent-to-string` implied by `-D warnings`

error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
  --> $DIR/inherent_to_string.rs:44:5
   |
LL | /     fn to_string(&self) -> String {
LL | |         "C.to_string()".to_string()
LL | |     }
   | |_____^
   |
   = help: remove the inherent method from type `C`
note: the lint level is defined here
  --> $DIR/inherent_to_string.rs:2:9
   |
LL | #![deny(clippy::inherent_to_string_shadow_display)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors