You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/span/issue-39018.stderr
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&'static str`
2
2
--> $DIR/issue-39018.rs:12:13
3
3
|
4
4
12 | let x = "Hello " + "World!";
5
-
| ^^^^^^^^-----------
6
-
| |
7
-
| 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. `"Hello ".to_owned() + "World!"`
5
+
| ^^^^^^^^ `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: `"Hello ".to_owned()`
8
6
|
9
7
= note: `+` can't be used to concatenate two `&str` strings
0 commit comments