fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
893 B17 linesraw
1error[E0369]: cannot add `&str` to `&str`
2  --> $DIR/issue-47380.rs:3:35
3   |
4LL |     println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
5   |                                      - ^ ---------- &str
6   |                                      | |
7   |                                      | `+` cannot be used to concatenate two `&str` strings
8   |                                      &str
9   |
10help: `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
11   |
12LL |     println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
13   |                                      ^^^^^^^^^^^^
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0369`.