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
+2-10
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&'static str`
4
4
12 | let x = "Hello " + "World!";
5
5
| ^^^^^^^^
6
6
|
7
-
note: `+` can't be used to concatenate two `&str` strings
8
-
--> $DIR/issue-39018.rs:12:13
9
-
|
10
-
12 | let x = "Hello " + "World!";
11
-
| ^^^^^^^^
7
+
= note: `+` can't be used to concatenate two `&str` strings
12
8
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.
13
9
| let x = "Hello ".to_owned() + "World!";
14
10
@@ -18,11 +14,7 @@ error[E0369]: binary operation `+` cannot be applied to type `World`
18
14
17 | let y = World::Hello + World::Goodbye;
19
15
| ^^^^^^^^^^^^
20
16
|
21
-
note: an implementation of `std::ops::Add` might be missing for `World`
22
-
--> $DIR/issue-39018.rs:17:13
23
-
|
24
-
17 | let y = World::Hello + World::Goodbye;
25
-
| ^^^^^^^^^^^^
17
+
= note: an implementation of `std::ops::Add` might be missing for `World`
0 commit comments