rust-clippy/tests/ui/inefficient_to_string.stderr

56 lines
2.6 KiB
Text
Raw Normal View History

2019-10-16 19:54:20 +00:00
error: calling `to_string` on `&&str`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:10:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrstr.to_string();
| ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()`
|
2022-09-22 16:04:22 +00:00
= help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
2020-01-31 19:21:10 +00:00
note: the lint level is defined here
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:1:9
2019-10-16 19:54:20 +00:00
|
LL | #![deny(clippy::inefficient_to_string)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: calling `to_string` on `&&&str`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:11:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrrstr.to_string();
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()`
|
= help: `&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
2019-10-16 19:54:20 +00:00
error: calling `to_string` on `&&std::string::String`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:19:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrstring.to_string();
| ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()`
|
= help: `&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
2019-10-16 19:54:20 +00:00
error: calling `to_string` on `&&&std::string::String`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:20:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrrstring.to_string();
| ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()`
|
= help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
2019-10-16 19:54:20 +00:00
2022-09-22 17:39:38 +00:00
error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:28:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrcow.to_string();
| ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
|
2022-09-22 17:39:38 +00:00
= help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
2019-10-16 19:54:20 +00:00
2022-09-22 17:39:38 +00:00
error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
2024-02-17 12:16:29 +00:00
--> tests/ui/inefficient_to_string.rs:29:21
2019-10-16 19:54:20 +00:00
|
LL | let _: String = rrrcow.to_string();
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
|
2022-09-22 17:39:38 +00:00
= help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
2019-10-16 19:54:20 +00:00
error: aborting due to 6 previous errors