blob: 216e32ddae4115e4bbc7bd65e919a1b2a98a9ba1 [file] [log] [blame]
error[E0369]: cannot add `&str` to `&str`
--> $DIR/issue-47380.rs:3:35
|
LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
| - ^ ---------- &str
| | |
| | `+` cannot be used to concatenate two `&str` strings
| &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 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
| ^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.