]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-72690.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-72690.stderr
1 error[E0283]: type annotations needed
2 --> $DIR/issue-72690.rs:7:5
3 |
4 LL | String::from("x".as_ref());
5 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
6 |
7 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
8 - impl<> From<&String> for String;
9 - impl<> From<&str> for String;
10
11 error[E0283]: type annotations needed
12 --> $DIR/issue-72690.rs:7:22
13 |
14 LL | String::from("x".as_ref());
15 | ----^^^^^^--
16 | | |
17 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
18 | this method call resolves to `&T`
19 |
20 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
21 - impl AsRef<OsStr> for str;
22 - impl AsRef<Path> for str;
23 - impl AsRef<[u8]> for str;
24 - impl AsRef<str> for str;
25
26 error[E0282]: type annotations needed
27 --> $DIR/issue-72690.rs:12:6
28 |
29 LL | |x| String::from("x".as_ref());
30 | ^ consider giving this closure parameter a type
31
32 error[E0283]: type annotations needed
33 --> $DIR/issue-72690.rs:12:26
34 |
35 LL | |x| String::from("x".as_ref());
36 | ----^^^^^^--
37 | | |
38 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
39 | this method call resolves to `&T`
40 |
41 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
42 - impl AsRef<OsStr> for str;
43 - impl AsRef<Path> for str;
44 - impl AsRef<[u8]> for str;
45 - impl AsRef<str> for str;
46
47 error[E0283]: type annotations needed for `&T`
48 --> $DIR/issue-72690.rs:17:17
49 |
50 LL | let _ = "x".as_ref();
51 | - ^^^^^^ cannot infer type for type parameter `T` declared on the trait `AsRef`
52 | |
53 | consider giving this pattern the explicit type `&T`, where the type parameter `T` is specified
54 |
55 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
56 - impl AsRef<OsStr> for str;
57 - impl AsRef<Path> for str;
58 - impl AsRef<[u8]> for str;
59 - impl AsRef<str> for str;
60
61 error[E0283]: type annotations needed
62 --> $DIR/issue-72690.rs:21:5
63 |
64 LL | String::from("x".as_ref());
65 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
66 |
67 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
68 - impl<> From<&String> for String;
69 - impl<> From<&str> for String;
70
71 error[E0283]: type annotations needed
72 --> $DIR/issue-72690.rs:21:22
73 |
74 LL | String::from("x".as_ref());
75 | ----^^^^^^--
76 | | |
77 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
78 | this method call resolves to `&T`
79 |
80 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
81 - impl AsRef<OsStr> for str;
82 - impl AsRef<Path> for str;
83 - impl AsRef<[u8]> for str;
84 - impl AsRef<str> for str;
85
86 error[E0283]: type annotations needed
87 --> $DIR/issue-72690.rs:28:5
88 |
89 LL | String::from("x".as_ref());
90 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
91 |
92 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
93 - impl<> From<&String> for String;
94 - impl<> From<&str> for String;
95
96 error[E0283]: type annotations needed
97 --> $DIR/issue-72690.rs:28:22
98 |
99 LL | String::from("x".as_ref());
100 | ----^^^^^^--
101 | | |
102 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
103 | this method call resolves to `&T`
104 |
105 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
106 - impl AsRef<OsStr> for str;
107 - impl AsRef<Path> for str;
108 - impl AsRef<[u8]> for str;
109 - impl AsRef<str> for str;
110
111 error[E0283]: type annotations needed
112 --> $DIR/issue-72690.rs:37:5
113 |
114 LL | String::from("x".as_ref());
115 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
116 |
117 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
118 - impl<> From<&String> for String;
119 - impl<> From<&str> for String;
120
121 error[E0283]: type annotations needed
122 --> $DIR/issue-72690.rs:37:22
123 |
124 LL | String::from("x".as_ref());
125 | ----^^^^^^--
126 | | |
127 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
128 | this method call resolves to `&T`
129 |
130 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
131 - impl AsRef<OsStr> for str;
132 - impl AsRef<Path> for str;
133 - impl AsRef<[u8]> for str;
134 - impl AsRef<str> for str;
135
136 error[E0283]: type annotations needed
137 --> $DIR/issue-72690.rs:46:5
138 |
139 LL | String::from("x".as_ref());
140 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
141 |
142 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
143 - impl<> From<&String> for String;
144 - impl<> From<&str> for String;
145
146 error[E0283]: type annotations needed
147 --> $DIR/issue-72690.rs:46:22
148 |
149 LL | String::from("x".as_ref());
150 | ----^^^^^^--
151 | | |
152 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
153 | this method call resolves to `&T`
154 |
155 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
156 - impl AsRef<OsStr> for str;
157 - impl AsRef<Path> for str;
158 - impl AsRef<[u8]> for str;
159 - impl AsRef<str> for str;
160
161 error[E0283]: type annotations needed
162 --> $DIR/issue-72690.rs:53:5
163 |
164 LL | String::from("x".as_ref());
165 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
166 |
167 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
168 - impl<> From<&String> for String;
169 - impl<> From<&str> for String;
170
171 error[E0283]: type annotations needed
172 --> $DIR/issue-72690.rs:53:22
173 |
174 LL | String::from("x".as_ref());
175 | ----^^^^^^--
176 | | |
177 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
178 | this method call resolves to `&T`
179 |
180 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
181 - impl AsRef<OsStr> for str;
182 - impl AsRef<Path> for str;
183 - impl AsRef<[u8]> for str;
184 - impl AsRef<str> for str;
185
186 error[E0283]: type annotations needed
187 --> $DIR/issue-72690.rs:62:5
188 |
189 LL | String::from("x".as_ref());
190 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
191 |
192 = note: multiple `impl`s satisfying `String: From<&_>` found in the `alloc` crate:
193 - impl<> From<&String> for String;
194 - impl<> From<&str> for String;
195
196 error[E0283]: type annotations needed
197 --> $DIR/issue-72690.rs:62:22
198 |
199 LL | String::from("x".as_ref());
200 | ----^^^^^^--
201 | | |
202 | | cannot infer type for type parameter `T` declared on the trait `AsRef`
203 | this method call resolves to `&T`
204 |
205 = note: multiple `impl`s satisfying `str: AsRef<_>` found in the following crates: `core`, `std`:
206 - impl AsRef<OsStr> for str;
207 - impl AsRef<Path> for str;
208 - impl AsRef<[u8]> for str;
209 - impl AsRef<str> for str;
210
211 error: aborting due to 17 previous errors
212
213 Some errors have detailed explanations: E0282, E0283.
214 For more information about an error, try `rustc --explain E0282`.