@@ -29,16 +29,6 @@ error[E0282]: type annotations needed
2929LL | |x| String::from("x".as_ref());
3030 | ^ consider giving this closure parameter a type
3131
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-
4232error[E0283]: type annotations needed
4333 --> $DIR/issue-72690.rs:12:26
4434 |
@@ -55,7 +45,7 @@ LL | |x| String::from("x".as_ref());
5545 - impl AsRef<str> for str;
5646
5747error[E0283]: type annotations needed for `&T`
58- --> $DIR/issue-72690.rs:18 :17
48+ --> $DIR/issue-72690.rs:17 :17
5949 |
6050LL | let _ = "x".as_ref();
6151 | - ^^^^^^ cannot infer type for type parameter `T` declared on the trait `AsRef`
@@ -69,7 +59,7 @@ LL | let _ = "x".as_ref();
6959 - impl AsRef<str> for str;
7060
7161error[E0283]: type annotations needed
72- --> $DIR/issue-72690.rs:22 :5
62+ --> $DIR/issue-72690.rs:21 :5
7363 |
7464LL | String::from("x".as_ref());
7565 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -79,7 +69,7 @@ LL | String::from("x".as_ref());
7969 - impl<> From<&str> for String;
8070
8171error[E0283]: type annotations needed
82- --> $DIR/issue-72690.rs:22 :22
72+ --> $DIR/issue-72690.rs:21 :22
8373 |
8474LL | String::from("x".as_ref());
8575 | ----^^^^^^--
@@ -94,7 +84,7 @@ LL | String::from("x".as_ref());
9484 - impl AsRef<str> for str;
9585
9686error[E0283]: type annotations needed
97- --> $DIR/issue-72690.rs:29 :5
87+ --> $DIR/issue-72690.rs:28 :5
9888 |
9989LL | String::from("x".as_ref());
10090 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -104,7 +94,7 @@ LL | String::from("x".as_ref());
10494 - impl<> From<&str> for String;
10595
10696error[E0283]: type annotations needed
107- --> $DIR/issue-72690.rs:29 :22
97+ --> $DIR/issue-72690.rs:28 :22
10898 |
10999LL | String::from("x".as_ref());
110100 | ----^^^^^^--
@@ -119,7 +109,7 @@ LL | String::from("x".as_ref());
119109 - impl AsRef<str> for str;
120110
121111error[E0283]: type annotations needed
122- --> $DIR/issue-72690.rs:38 :5
112+ --> $DIR/issue-72690.rs:37 :5
123113 |
124114LL | String::from("x".as_ref());
125115 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -129,7 +119,7 @@ LL | String::from("x".as_ref());
129119 - impl<> From<&str> for String;
130120
131121error[E0283]: type annotations needed
132- --> $DIR/issue-72690.rs:38 :22
122+ --> $DIR/issue-72690.rs:37 :22
133123 |
134124LL | String::from("x".as_ref());
135125 | ----^^^^^^--
@@ -144,7 +134,7 @@ LL | String::from("x".as_ref());
144134 - impl AsRef<str> for str;
145135
146136error[E0283]: type annotations needed
147- --> $DIR/issue-72690.rs:47 :5
137+ --> $DIR/issue-72690.rs:46 :5
148138 |
149139LL | String::from("x".as_ref());
150140 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -154,7 +144,7 @@ LL | String::from("x".as_ref());
154144 - impl<> From<&str> for String;
155145
156146error[E0283]: type annotations needed
157- --> $DIR/issue-72690.rs:47 :22
147+ --> $DIR/issue-72690.rs:46 :22
158148 |
159149LL | String::from("x".as_ref());
160150 | ----^^^^^^--
@@ -169,7 +159,7 @@ LL | String::from("x".as_ref());
169159 - impl AsRef<str> for str;
170160
171161error[E0283]: type annotations needed
172- --> $DIR/issue-72690.rs:54 :5
162+ --> $DIR/issue-72690.rs:53 :5
173163 |
174164LL | String::from("x".as_ref());
175165 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -179,7 +169,7 @@ LL | String::from("x".as_ref());
179169 - impl<> From<&str> for String;
180170
181171error[E0283]: type annotations needed
182- --> $DIR/issue-72690.rs:54 :22
172+ --> $DIR/issue-72690.rs:53 :22
183173 |
184174LL | String::from("x".as_ref());
185175 | ----^^^^^^--
@@ -194,7 +184,7 @@ LL | String::from("x".as_ref());
194184 - impl AsRef<str> for str;
195185
196186error[E0283]: type annotations needed
197- --> $DIR/issue-72690.rs:63 :5
187+ --> $DIR/issue-72690.rs:62 :5
198188 |
199189LL | String::from("x".as_ref());
200190 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
@@ -204,7 +194,7 @@ LL | String::from("x".as_ref());
204194 - impl<> From<&str> for String;
205195
206196error[E0283]: type annotations needed
207- --> $DIR/issue-72690.rs:63 :22
197+ --> $DIR/issue-72690.rs:62 :22
208198 |
209199LL | String::from("x".as_ref());
210200 | ----^^^^^^--
@@ -218,7 +208,7 @@ LL | String::from("x".as_ref());
218208 - impl AsRef<[u8]> for str;
219209 - impl AsRef<str> for str;
220210
221- error: aborting due to 18 previous errors
211+ error: aborting due to 17 previous errors
222212
223213Some errors have detailed explanations: E0282, E0283.
224214For more information about an error, try `rustc --explain E0282`.
0 commit comments