2019-12-10 22:03:13 +01:00
|
|
|
error[E0369]: cannot add `&str` to `&str`
|
2019-03-27 13:13:09 -04:00
|
|
|
--> $DIR/issue-47380.rs:3:35
|
2018-01-17 01:31:21 +05:30
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
|
2022-01-18 16:38:06 -08:00
|
|
|
| - ^ ---------- &str
|
|
|
|
| | |
|
|
|
|
| | `+` cannot be used to concatenate two `&str` strings
|
2019-03-27 13:13:09 -04:00
|
|
|
| &str
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2022-01-18 16:32:58 -08:00
|
|
|
= note: string concatenation requires an owned `String` on the left
|
2022-01-18 16:38:06 -08:00
|
|
|
help: create an owned `String` from a string reference
|
|
|
|
|
|
|
|
|
LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
|
|
|
|
| +++++++++++
|
2018-01-17 01:31:21 +05:30
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0369`.
|