]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47380.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-47380.stderr
1 error[E0369]: binary operation `+` cannot be applied to type `&str`
2   --> $DIR/issue-47380.rs:12:33
3    |
4 LL |     println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
5    |                                      ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
6 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
7    |
8 LL |     println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
9    |                                      ^^^^^^^^^^^^
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0369`.