fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: calling `to_string` on `&&str` 2 --> $DIR/inefficient_to_string.rs:10:21 3 | 4LL | let _: String = rrstr.to_string(); 5 | ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()` 6 | 7 = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString` 8note: the lint level is defined here 9 --> $DIR/inefficient_to_string.rs:1:9 10 | 11LL | #![deny(clippy::inefficient_to_string)] 12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 13 14error: calling `to_string` on `&&&str` 15 --> $DIR/inefficient_to_string.rs:11:21 16 | 17LL | let _: String = rrrstr.to_string(); 18 | ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()` 19 | 20 = help: `&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString` 21 22error: calling `to_string` on `&&std::string::String` 23 --> $DIR/inefficient_to_string.rs:19:21 24 | 25LL | let _: String = rrstring.to_string(); 26 | ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()` 27 | 28 = help: `&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString` 29 30error: calling `to_string` on `&&&std::string::String` 31 --> $DIR/inefficient_to_string.rs:20:21 32 | 33LL | let _: String = rrrstring.to_string(); 34 | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()` 35 | 36 = help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString` 37 38error: calling `to_string` on `&&std::borrow::Cow<'_, str>` 39 --> $DIR/inefficient_to_string.rs:28:21 40 | 41LL | let _: String = rrcow.to_string(); 42 | ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()` 43 | 44 = help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString` 45 46error: calling `to_string` on `&&&std::borrow::Cow<'_, str>` 47 --> $DIR/inefficient_to_string.rs:29:21 48 | 49LL | let _: String = rrrcow.to_string(); 50 | ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()` 51 | 52 = help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString` 53 54error: aborting due to 6 previous errors 55