]> git.lizzy.rs Git - rust.git/blob - tests/ui/str/str-concat-on-double-ref.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / str / str-concat-on-double-ref.stderr
1 error[E0369]: cannot add `&str` to `&String`
2   --> $DIR/str-concat-on-double-ref.rs:4:15
3    |
4 LL |     let c = a + b;
5    |             - ^ - &str
6    |             | |
7    |             | `+` cannot be used to concatenate two `&str` strings
8    |             &String
9    |
10    = note: string concatenation requires an owned `String` on the left
11 help: create an owned `String` from a string reference
12    |
13 LL |     let c = a.to_owned() + b;
14    |              +++++++++++
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0369`.