2020-09-02 07:40:56 +00:00
|
|
|
error[E0369]: cannot add `&str` to `&String`
|
2019-03-27 17:13:09 +00:00
|
|
|
--> $DIR/str-concat-on-double-ref.rs:4:15
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let c = a + b;
|
2022-01-19 00:38:06 +00:00
|
|
|
| - ^ - &str
|
|
|
|
| | |
|
|
|
|
| | `+` cannot be used to concatenate two `&str` strings
|
2020-09-02 07:40:56 +00:00
|
|
|
| &String
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2022-01-19 00:32:58 +00:00
|
|
|
= note: string concatenation requires an owned `String` on the left
|
2022-01-19 00:38:06 +00:00
|
|
|
help: create an owned `String` from a string reference
|
|
|
|
|
|
|
|
|
LL | let c = a.to_owned() + b;
|
|
|
|
| +++++++++++
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0369`.
|