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/issues/issue-47377.stderr
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ LL | let _a = b + ", World!";
7
7
| | `+` cannot be used to concatenate two `&str` strings
8
8
| &str
9
9
|
10
-
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
10
+
= note: 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.
11
+
help: use `to_owned()` to create an owned `String` from a string reference
Copy file name to clipboardExpand all lines: src/test/ui/issues/issue-47380.stderr
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
7
7
| | `+` cannot be used to concatenate two `&str` strings
8
8
| &str
9
9
|
10
-
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
10
+
= note: 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.
11
+
help: use `to_owned()` to create an owned `String` from a string reference
11
12
|
12
13
LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
Copy file name to clipboardExpand all lines: src/test/ui/span/issue-39018.stderr
+17-14Lines changed: 17 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ LL | let x = "Hello " + "World!";
7
7
| | `+` cannot be used to concatenate two `&str` strings
8
8
| &str
9
9
|
10
-
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
10
+
= note: 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.
11
+
help: use `to_owned()` to create an owned `String` from a string reference
11
12
|
12
13
LL | let x = "Hello ".to_owned() + "World!";
13
14
| +++++++++++
@@ -46,7 +47,7 @@ LL | let x = "Hello " + "World!".to_owned();
46
47
| | `+` cannot be used to concatenate a `&str` with a `String`
47
48
| &str
48
49
|
49
-
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
50
+
help: call `.to_owned()` on the left and add a borrow on the right
50
51
|
51
52
LL | let x = "Hello ".to_owned() + &"World!".to_owned();
52
53
| +++++++++++ +
@@ -59,12 +60,9 @@ LL | let _ = &a + &b;
59
60
| | |
60
61
| | `+` cannot be used to concatenate two `&str` strings
61
62
| &String
63
+
| help: remove the borrow to obtain an owned `String`
62
64
|
63
-
help: 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
64
-
|
65
-
LL - let _ = &a + &b;
66
-
LL + let _ = a + &b;
67
-
|
65
+
= note: 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.
68
66
69
67
error[E0369]: cannot add `String` to `&String`
70
68
--> $DIR/issue-39018.rs:27:16
@@ -75,7 +73,7 @@ LL | let _ = &a + b;
75
73
| | `+` cannot be used to concatenate a `&str` with a `String`
76
74
| &String
77
75
|
78
-
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
76
+
help: remove the borrow on the left and add one on the right
79
77
|
80
78
LL - let _ = &a + b;
81
79
LL + let _ = a + &b;
@@ -99,7 +97,7 @@ LL | let _ = e + b;
99
97
| | `+` cannot be used to concatenate a `&str` with a `String`
100
98
| &String
101
99
|
102
-
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
100
+
help: call `.to_owned()` on the left and add a borrow on the right
103
101
|
104
102
LL | let _ = e.to_owned() + &b;
105
103
| +++++++++++ +
@@ -113,7 +111,8 @@ LL | let _ = e + &b;
113
111
| | `+` cannot be used to concatenate two `&str` strings
114
112
| &String
115
113
|
116
-
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
114
+
= note: 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.
115
+
help: use `to_owned()` to create an owned `String` from a string reference
117
116
|
118
117
LL | let _ = e.to_owned() + &b;
119
118
| +++++++++++
@@ -127,7 +126,8 @@ LL | let _ = e + d;
127
126
| | `+` cannot be used to concatenate two `&str` strings
128
127
| &String
129
128
|
130
-
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
129
+
= note: 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.
130
+
help: use `to_owned()` to create an owned `String` from a string reference
131
131
|
132
132
LL | let _ = e.to_owned() + d;
133
133
| +++++++++++
@@ -141,7 +141,8 @@ LL | let _ = e + &d;
141
141
| | `+` cannot be used to concatenate two `&str` strings
142
142
| &String
143
143
|
144
-
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
144
+
= note: 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.
145
+
help: use `to_owned()` to create an owned `String` from a string reference
145
146
|
146
147
LL | let _ = e.to_owned() + &d;
147
148
| +++++++++++
@@ -171,7 +172,8 @@ LL | let _ = c + &d;
171
172
| | `+` cannot be used to concatenate two `&str` strings
172
173
| &str
173
174
|
174
-
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
175
+
= note: 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.
176
+
help: use `to_owned()` to create an owned `String` from a string reference
175
177
|
176
178
LL | let _ = c.to_owned() + &d;
177
179
| +++++++++++
@@ -185,7 +187,8 @@ LL | let _ = c + d;
185
187
| | `+` cannot be used to concatenate two `&str` strings
186
188
| &str
187
189
|
188
-
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
190
+
= note: 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.
191
+
help: use `to_owned()` to create an owned `String` from a string reference
Copy file name to clipboardExpand all lines: src/test/ui/str/str-concat-on-double-ref.stderr
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ LL | let c = a + b;
7
7
| | `+` cannot be used to concatenate two `&str` strings
8
8
| &String
9
9
|
10
-
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
10
+
= note: 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.
11
+
help: use `to_owned()` to create an owned `String` from a string reference
Copy file name to clipboardExpand all lines: src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ LL | ...ཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔ
7
7
| | `+` cannot be used to concatenate two `&str` strings
8
8
| &str
9
9
|
10
-
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
10
+
= note: 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.
11
+
help: use `to_owned()` to create an owned `String` from a string reference
11
12
|
12
13
LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!";
0 commit comments