|
1 | 1 | error: calling `to_string` on `&&str`
|
2 |
| - --> $DIR/inefficient_to_string.rs:11:21 |
| 2 | + --> $DIR/inefficient_to_string.rs:12:21 |
3 | 3 | |
|
4 | 4 | LL | let _: String = rrstr.to_string();
|
5 | 5 | | ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()`
|
6 | 6 | |
|
7 | 7 | note: lint level defined here
|
8 |
| - --> $DIR/inefficient_to_string.rs:1:9 |
| 8 | + --> $DIR/inefficient_to_string.rs:2:9 |
9 | 9 | |
|
10 | 10 | LL | #![deny(clippy::inefficient_to_string)]
|
11 | 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
12 | 12 | = help: `&str` implements `ToString` through the blanket impl, but `str` specializes `ToString` directly
|
13 | 13 |
|
14 | 14 | error: calling `to_string` on `&&&str`
|
15 |
| - --> $DIR/inefficient_to_string.rs:12:21 |
| 15 | + --> $DIR/inefficient_to_string.rs:13:21 |
16 | 16 | |
|
17 | 17 | LL | let _: String = rrrstr.to_string();
|
18 | 18 | | ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()`
|
19 | 19 | |
|
20 | 20 | = help: `&&str` implements `ToString` through the blanket impl, but `str` specializes `ToString` directly
|
21 | 21 |
|
22 | 22 | error: calling `to_string` on `&&std::string::String`
|
23 |
| - --> $DIR/inefficient_to_string.rs:20:21 |
| 23 | + --> $DIR/inefficient_to_string.rs:21:21 |
24 | 24 | |
|
25 | 25 | LL | let _: String = rrstring.to_string();
|
26 | 26 | | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()`
|
27 | 27 | |
|
28 | 28 | = help: `&std::string::String` implements `ToString` through the blanket impl, but `std::string::String` specializes `ToString` directly
|
29 | 29 |
|
30 | 30 | error: calling `to_string` on `&&&std::string::String`
|
31 |
| - --> $DIR/inefficient_to_string.rs:21:21 |
| 31 | + --> $DIR/inefficient_to_string.rs:22:21 |
32 | 32 | |
|
33 | 33 | LL | let _: String = rrrstring.to_string();
|
34 | 34 | | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()`
|
35 | 35 | |
|
36 | 36 | = help: `&&std::string::String` implements `ToString` through the blanket impl, but `std::string::String` specializes `ToString` directly
|
37 | 37 |
|
38 | 38 | error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
|
39 |
| - --> $DIR/inefficient_to_string.rs:29:21 |
| 39 | + --> $DIR/inefficient_to_string.rs:30:21 |
40 | 40 | |
|
41 | 41 | LL | let _: String = rrcow.to_string();
|
42 | 42 | | ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
|
43 | 43 | |
|
44 | 44 | = help: `&std::borrow::Cow<'_, str>` implements `ToString` through the blanket impl, but `std::borrow::Cow<'_, str>` specializes `ToString` directly
|
45 | 45 |
|
46 | 46 | error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
|
47 |
| - --> $DIR/inefficient_to_string.rs:30:21 |
| 47 | + --> $DIR/inefficient_to_string.rs:31:21 |
48 | 48 | |
|
49 | 49 | LL | let _: String = rrrcow.to_string();
|
50 | 50 | | ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
|
|
0 commit comments