fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
737 B16 linesraw
1error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
2  --> $DIR/str-concat-on-double-ref.rs:4:15
3   |
4LL |     let c = a + b;
5   |             - ^ - &str
6   |             | |
7   |             | `+` cannot be used to concatenate two `&str` strings
8   |             &std::string::String
9help: `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
10   |
11LL |     let c = a.to_owned() + b;
12   |             ^^^^^^^^^^^^
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0369`.