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
error[E0369]: binary operation `+` cannot be applied to type `&str`
2
-
--> $DIR/issue-47377.rs:13:14
2
+
--> $DIR/issue-47377.rs:13:12
3
3
|
4
-
13 | let _a = b + ", World!";
5
-
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
4
+
13 | let _a = b + ", World!";
5
+
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
6
6
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
Copy file name to clipboardExpand all lines: src/test/ui/issue-47380.stderr
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
error[E0369]: binary operation `+` cannot be applied to type `&str`
2
-
--> $DIR/issue-47380.rs:13:33
2
+
--> $DIR/issue-47380.rs:12:33
3
3
|
4
-
13 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
4
+
12 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
5
5
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
6
6
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
7
7
|
8
-
13 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
8
+
12 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
0 commit comments