blob: d77e0d8f242d7fec00d6217c5a56c68cabf4920d [file] [log] [blame]
error[E0369]: cannot add `&str` to `&std::string::String`
--> $DIR/str-concat-on-double-ref.rs:4:15
|
LL | let c = a + b;
| - ^ - &str
| | |
| | `+` cannot be used to concatenate two `&str` strings
| &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 c = a.to_owned() + b;
| ^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.