Merged tests/ui/typeck/non-function-call-error-2 with tests/ui/typeck/non-function-call-error Add comment to tests/ui/traits/normalize-associated-type-in-where-clause.rs Merged tests/ui/privacy/private-item-simple-2.rs with tests/ui/privacy/private-item-simple.rs Merged tests/ui/str/str-add-operator-2.rs with tests/ui/str/str-add-operator.rs Add comment to tests/ui/imports/duplicate-empty-imports.rs Add comment to tests/ui/for-loop-while/nested-loop-break-unit.rs Add comment to tests/ui/match/match-ref-option-pattern.rs Add comment to tests/ui/closures/simple-capture-and-call.rs Add comment to tests/ui/type/never-type-inference-fail.rs Add comment to tests/ui/match/match-stack-overflow-72933.rs
18 lines
602 B
Text
18 lines
602 B
Text
error[E0369]: cannot add `&str` to `&str`
|
|
--> $DIR/str-add-operator.rs:5:14
|
|
|
|
|
LL | let _a = b + ", World!";
|
|
| - ^ ---------- &str
|
|
| | |
|
|
| | `+` cannot be used to concatenate two `&str` strings
|
|
| &str
|
|
|
|
|
= note: string concatenation requires an owned `String` on the left
|
|
help: create an owned `String` from a string reference
|
|
|
|
|
LL | let _a = b.to_owned() + ", World!";
|
|
| +++++++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0369`.
|