14 lines
782 B
Plaintext
14 lines
782 B
Plaintext
error[E0369]: binary operation `+` cannot be applied to type `&str`
|
|
--> $DIR/issue-47380.rs:12:33
|
|
|
|
|
LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
|
|
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
|
|
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
|
|
|
|
If you want more information on this error, try using "rustc --explain E0369"
|