summary refs log tree commit diff
path: root/src/test/ui/issue-47377.stderr
blob: 66c4a1277a0f14d92ae5d7afe24d10a0b15dd508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
error[E0369]: binary operation `+` cannot be applied to type `&str`
  --> $DIR/issue-47377.rs:13:12
   |
LL |      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 |      let _a = b.to_owned() + ", World!";
   |               ^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0369`.