help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
help: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = a + &b;
| ^
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = &a.to_owned() + &b;
| ^^^^^^^^^^^^^ ^^
error[E0308]: mismatched types
--> $DIR/issue-39018.rs:29:17
|
LL | let _ = a + b;
| ^
| |
| expected &str, found struct `std::string::String`
| help: consider borrowing here: `&b`
|
= note: expected type `&str`
found type `std::string::String`
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = e.to_owned() + &b;
| ^^^^^^^^^^^^ ^^
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = e.to_owned() + &b;
| ^^^^^^^^^^^^
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = e.to_owned() + d;
| ^^^^^^^^^^^^
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = e.to_owned() + &d;
| ^^^^^^^^^^^^
error[E0369]: binary operation `+` cannot be applied to type `&&str`
--> $DIR/issue-39018.rs:34:16
|
LL | let _ = &c + &d;
| -- ^ -- &&str
| |
| &&str
|
= note: an implementation of `std::ops::Add` might be missing for `&&str`
error[E0369]: binary operation `+` cannot be applied to type `&&str`
--> $DIR/issue-39018.rs:35:16
|
LL | let _ = &c + d;
| -- ^ - &str
| |
| &&str
|
= note: an implementation of `std::ops::Add` might be missing for `&&str`
error[E0369]: binary operation `+` cannot be applied to type `&str`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
LL | let _ = c.to_owned() + &d;
| ^^^^^^^^^^^^
error[E0369]: binary operation `+` cannot be applied to type `&str`
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left