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
| | `+` can't be used to concatenate a `&str` with a `String`
31
31
| &str
32
-
| `+` can't be used to concatenate a `&str` with a `String`
33
32
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
34
33
|
35
34
LL | let x = "Hello ".to_owned() + &"World!".to_owned();
@@ -52,11 +51,10 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::Stri
52
51
--> $DIR/issue-39018.rs:27:16
53
52
|
54
53
LL | let _ = &a + b;
55
-
| ---^--
56
-
| | |
57
-
| | std::string::String
54
+
| -- ^ - std::string::String
55
+
| | |
56
+
| | `+` can't be used to concatenate a `&str` with a `String`
58
57
| &std::string::String
59
-
| `+` can't be used to concatenate a `&str` with a `String`
60
58
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
61
59
|
62
60
LL | let _ = &a.to_owned() + &b;
@@ -78,11 +76,10 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::Stri
78
76
--> $DIR/issue-39018.rs:30:15
79
77
|
80
78
LL | let _ = e + b;
81
-
| --^--
82
-
| | |
83
-
| | std::string::String
79
+
| - ^ - std::string::String
80
+
| | |
81
+
| | `+` can't be used to concatenate a `&str` with a `String`
84
82
| &std::string::String
85
-
| `+` can't be used to concatenate a `&str` with a `String`
86
83
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
0 commit comments