]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/inefficient_to_string.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / inefficient_to_string.stderr
index 70e3c1e82c79b98c83f756056af180512606a240..4be46161e8b74f2cb88978d5761b1c61509ab377 100644 (file)
@@ -4,12 +4,12 @@ error: calling `to_string` on `&&str`
 LL |     let _: String = rrstr.to_string();
    |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()`
    |
-note: lint level defined here
-  --> $DIR/inefficient_to_string.rs:1:9
+note: the lint level is defined here
+  --> $DIR/inefficient_to_string.rs:2:9
    |
 LL | #![deny(clippy::inefficient_to_string)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = help: `&str` implements `ToString` through the blanket impl, but `str` specializes `ToString` directly
+   = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&&str`
   --> $DIR/inefficient_to_string.rs:12:21
@@ -17,7 +17,7 @@ error: calling `to_string` on `&&&str`
 LL |     let _: String = rrrstr.to_string();
    |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()`
    |
-   = help: `&&str` implements `ToString` through the blanket impl, but `str` specializes `ToString` directly
+   = help: `&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&std::string::String`
   --> $DIR/inefficient_to_string.rs:20:21
@@ -25,7 +25,7 @@ error: calling `to_string` on `&&std::string::String`
 LL |     let _: String = rrstring.to_string();
    |                     ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()`
    |
-   = help: `&std::string::String` implements `ToString` through the blanket impl, but `std::string::String` specializes `ToString` directly
+   = help: `&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&&std::string::String`
   --> $DIR/inefficient_to_string.rs:21:21
@@ -33,23 +33,23 @@ error: calling `to_string` on `&&&std::string::String`
 LL |     let _: String = rrrstring.to_string();
    |                     ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()`
    |
-   = help: `&&std::string::String` implements `ToString` through the blanket impl, but `std::string::String` specializes `ToString` directly
+   = help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
 
-error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
+error: calling `to_string` on `&&std::borrow::Cow<str>`
   --> $DIR/inefficient_to_string.rs:29:21
    |
 LL |     let _: String = rrcow.to_string();
    |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
    |
-   = help: `&std::borrow::Cow<'_, str>` implements `ToString` through the blanket impl, but `std::borrow::Cow<'_, str>` specializes `ToString` directly
+   = help: `&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
 
-error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
+error: calling `to_string` on `&&&std::borrow::Cow<str>`
   --> $DIR/inefficient_to_string.rs:30:21
    |
 LL |     let _: String = rrrcow.to_string();
    |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
    |
-   = help: `&&std::borrow::Cow<'_, str>` implements `ToString` through the blanket impl, but `std::borrow::Cow<'_, str>` specializes `ToString` directly
+   = help: `&&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
 
 error: aborting due to 6 previous errors