]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-72690.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-72690.stderr
CommitLineData
f035d41b
XL
1error[E0283]: type annotations needed
2 --> $DIR/issue-72690.rs:7:5
3 |
4LL | String::from("x".as_ref());
29967ef6 5 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 6 |
3c0e092e
XL
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
11error[E0283]: type annotations needed
12 --> $DIR/issue-72690.rs:7:22
136023e0 13 |
3c0e092e
XL
14LL | 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;
f035d41b
XL
25
26error[E0282]: type annotations needed
3c0e092e 27 --> $DIR/issue-72690.rs:12:6
f035d41b
XL
28 |
29LL | |x| String::from("x".as_ref());
30 | ^ consider giving this closure parameter a type
31
3c0e092e
XL
32error[E0283]: type annotations needed
33 --> $DIR/issue-72690.rs:12:26
34 |
35LL | |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
29967ef6 47error[E0283]: type annotations needed for `&T`
ee023bcb 48 --> $DIR/issue-72690.rs:17:17
f035d41b
XL
49 |
50LL | let _ = "x".as_ref();
29967ef6
XL
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
f035d41b 54 |
3c0e092e
XL
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;
f035d41b
XL
60
61error[E0283]: type annotations needed
ee023bcb 62 --> $DIR/issue-72690.rs:21:5
f035d41b
XL
63 |
64LL | String::from("x".as_ref());
29967ef6 65 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 66 |
3c0e092e
XL
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
71error[E0283]: type annotations needed
ee023bcb 72 --> $DIR/issue-72690.rs:21:22
136023e0 73 |
3c0e092e
XL
74LL | 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;
f035d41b
XL
85
86error[E0283]: type annotations needed
ee023bcb 87 --> $DIR/issue-72690.rs:28:5
f035d41b
XL
88 |
89LL | String::from("x".as_ref());
29967ef6 90 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 91 |
3c0e092e
XL
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
96error[E0283]: type annotations needed
ee023bcb 97 --> $DIR/issue-72690.rs:28:22
136023e0 98 |
3c0e092e
XL
99LL | 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;
f035d41b
XL
110
111error[E0283]: type annotations needed
ee023bcb 112 --> $DIR/issue-72690.rs:37:5
f035d41b
XL
113 |
114LL | String::from("x".as_ref());
29967ef6 115 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 116 |
3c0e092e
XL
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
121error[E0283]: type annotations needed
ee023bcb 122 --> $DIR/issue-72690.rs:37:22
136023e0 123 |
3c0e092e
XL
124LL | 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;
f035d41b 135
29967ef6 136error[E0283]: type annotations needed
ee023bcb 137 --> $DIR/issue-72690.rs:46:5
f035d41b
XL
138 |
139LL | String::from("x".as_ref());
29967ef6 140 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 141 |
3c0e092e
XL
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
146error[E0283]: type annotations needed
ee023bcb 147 --> $DIR/issue-72690.rs:46:22
136023e0 148 |
3c0e092e
XL
149LL | 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;
f035d41b 160
29967ef6 161error[E0283]: type annotations needed
ee023bcb 162 --> $DIR/issue-72690.rs:53:5
f035d41b 163 |
f035d41b 164LL | String::from("x".as_ref());
29967ef6 165 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 166 |
3c0e092e
XL
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
171error[E0283]: type annotations needed
ee023bcb 172 --> $DIR/issue-72690.rs:53:22
136023e0 173 |
3c0e092e
XL
174LL | 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;
f035d41b 185
29967ef6 186error[E0283]: type annotations needed
ee023bcb 187 --> $DIR/issue-72690.rs:62:5
f035d41b 188 |
f035d41b 189LL | String::from("x".as_ref());
29967ef6 190 | ^^^^^^^^^^^^ cannot infer type for reference `&_`
f035d41b 191 |
3c0e092e
XL
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
196error[E0283]: type annotations needed
ee023bcb 197 --> $DIR/issue-72690.rs:62:22
136023e0 198 |
3c0e092e
XL
199LL | 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;
f035d41b 210
ee023bcb 211error: aborting due to 17 previous errors
f035d41b
XL
212
213Some errors have detailed explanations: E0282, E0283.
214For more information about an error, try `rustc --explain E0282`.