rust/src/test/ui/issues/issue-47377.stderr

17 lines
733 B
Plaintext
Raw Normal View History

2018-01-13 05:43:18 -06:00
error[E0369]: binary operation `+` cannot be applied to type `&str`
--> $DIR/issue-47377.rs:4:14
2018-01-13 05:43:18 -06:00
|
2018-02-22 18:42:32 -06:00
LL | let _a = b + ", World!";
| - ^ ---------- &str
| | |
2019-05-16 22:05:00 -05:00
| | `+` cannot be used to concatenate two `&str` strings
| &str
2018-01-13 05:43:18 -06:00
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
|
2018-02-24 17:01:39 -06:00
LL | let _a = b.to_owned() + ", World!";
2018-01-16 14:37:07 -06:00
| ^^^^^^^^^^^^
2018-01-13 05:43:18 -06:00
error: aborting due to previous error
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0369`.