@@ -29,16 +29,6 @@ error[E0282]: type annotations needed
29
29
LL | |x| String::from("x".as_ref());
30
30
| ^ consider giving this closure parameter a type
31
31
32
- error[E0283]: type annotations needed
33
- --> $DIR/issue-72690.rs:12:9
34
- |
35
- LL | |x| String::from("x".as_ref());
36
- | ^^^^^^^^^^^^ cannot infer type for reference `&_`
37
- |
38
- = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
39
- - impl<> From<&String> for String;
40
- - impl<> From<&str> for String;
41
-
42
32
error[E0283]: type annotations needed
43
33
--> $DIR/issue-72690.rs:12:26
44
34
|
@@ -55,7 +45,7 @@ LL | |x| String::from("x".as_ref());
55
45
- impl AsRef<str> for str;
56
46
57
47
error[E0283]: type annotations needed for `&T`
58
- --> $DIR/issue-72690.rs:18 :17
48
+ --> $DIR/issue-72690.rs:17 :17
59
49
|
60
50
LL | let _ = "x".as_ref();
61
51
| - ^^^^^^ cannot infer type for type parameter `T` declared on the trait `AsRef`
@@ -69,7 +59,7 @@ LL | let _ = "x".as_ref();
69
59
- impl AsRef<str> for str;
70
60
71
61
error[E0283]: type annotations needed
72
- --> $DIR/issue-72690.rs:22 :5
62
+ --> $DIR/issue-72690.rs:21 :5
73
63
|
74
64
LL | String::from("x".as_ref());
75
65
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -79,7 +69,7 @@ LL | String::from("x".as_ref());
79
69
- impl<> From<&str> for String;
80
70
81
71
error[E0283]: type annotations needed
82
- --> $DIR/issue-72690.rs:22 :22
72
+ --> $DIR/issue-72690.rs:21 :22
83
73
|
84
74
LL | String::from("x".as_ref());
85
75
| ----^^^^^^--
@@ -94,7 +84,7 @@ LL | String::from("x".as_ref());
94
84
- impl AsRef<str> for str;
95
85
96
86
error[E0283]: type annotations needed
97
- --> $DIR/issue-72690.rs:29 :5
87
+ --> $DIR/issue-72690.rs:28 :5
98
88
|
99
89
LL | String::from("x".as_ref());
100
90
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -104,7 +94,7 @@ LL | String::from("x".as_ref());
104
94
- impl<> From<&str> for String;
105
95
106
96
error[E0283]: type annotations needed
107
- --> $DIR/issue-72690.rs:29 :22
97
+ --> $DIR/issue-72690.rs:28 :22
108
98
|
109
99
LL | String::from("x".as_ref());
110
100
| ----^^^^^^--
@@ -119,7 +109,7 @@ LL | String::from("x".as_ref());
119
109
- impl AsRef<str> for str;
120
110
121
111
error[E0283]: type annotations needed
122
- --> $DIR/issue-72690.rs:38 :5
112
+ --> $DIR/issue-72690.rs:37 :5
123
113
|
124
114
LL | String::from("x".as_ref());
125
115
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -129,7 +119,7 @@ LL | String::from("x".as_ref());
129
119
- impl<> From<&str> for String;
130
120
131
121
error[E0283]: type annotations needed
132
- --> $DIR/issue-72690.rs:38 :22
122
+ --> $DIR/issue-72690.rs:37 :22
133
123
|
134
124
LL | String::from("x".as_ref());
135
125
| ----^^^^^^--
@@ -144,7 +134,7 @@ LL | String::from("x".as_ref());
144
134
- impl AsRef<str> for str;
145
135
146
136
error[E0283]: type annotations needed
147
- --> $DIR/issue-72690.rs:47 :5
137
+ --> $DIR/issue-72690.rs:46 :5
148
138
|
149
139
LL | String::from("x".as_ref());
150
140
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -154,7 +144,7 @@ LL | String::from("x".as_ref());
154
144
- impl<> From<&str> for String;
155
145
156
146
error[E0283]: type annotations needed
157
- --> $DIR/issue-72690.rs:47 :22
147
+ --> $DIR/issue-72690.rs:46 :22
158
148
|
159
149
LL | String::from("x".as_ref());
160
150
| ----^^^^^^--
@@ -169,7 +159,7 @@ LL | String::from("x".as_ref());
169
159
- impl AsRef<str> for str;
170
160
171
161
error[E0283]: type annotations needed
172
- --> $DIR/issue-72690.rs:54 :5
162
+ --> $DIR/issue-72690.rs:53 :5
173
163
|
174
164
LL | String::from("x".as_ref());
175
165
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -179,7 +169,7 @@ LL | String::from("x".as_ref());
179
169
- impl<> From<&str> for String;
180
170
181
171
error[E0283]: type annotations needed
182
- --> $DIR/issue-72690.rs:54 :22
172
+ --> $DIR/issue-72690.rs:53 :22
183
173
|
184
174
LL | String::from("x".as_ref());
185
175
| ----^^^^^^--
@@ -194,7 +184,7 @@ LL | String::from("x".as_ref());
194
184
- impl AsRef<str> for str;
195
185
196
186
error[E0283]: type annotations needed
197
- --> $DIR/issue-72690.rs:63 :5
187
+ --> $DIR/issue-72690.rs:62 :5
198
188
|
199
189
LL | String::from("x".as_ref());
200
190
| ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -204,7 +194,7 @@ LL | String::from("x".as_ref());
204
194
- impl<> From<&str> for String;
205
195
206
196
error[E0283]: type annotations needed
207
- --> $DIR/issue-72690.rs:63 :22
197
+ --> $DIR/issue-72690.rs:62 :22
208
198
|
209
199
LL | String::from("x".as_ref());
210
200
| ----^^^^^^--
@@ -218,7 +208,7 @@ LL | String::from("x".as_ref());
218
208
- impl AsRef<[u8]> for str;
219
209
- impl AsRef<str> for str;
220
210
221
- error: aborting due to 18 previous errors
211
+ error: aborting due to 17 previous errors
222
212
223
213
Some errors have detailed explanations: E0282, E0283.
224
214
For more information about an error, try `rustc --explain E0282`.
0 commit comments