]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | error[E0283]: type annotations needed |
2 | --> $DIR/issue-72690.rs:7:5 | |
3 | | | |
4 | LL | 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 | ||
11 | error[E0283]: type annotations needed | |
12 | --> $DIR/issue-72690.rs:7:22 | |
136023e0 | 13 | | |
3c0e092e XL |
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; | |
f035d41b XL |
25 | |
26 | error[E0282]: type annotations needed | |
3c0e092e | 27 | --> $DIR/issue-72690.rs:12:6 |
f035d41b XL |
28 | | |
29 | LL | |x| String::from("x".as_ref()); | |
30 | | ^ consider giving this closure parameter a type | |
31 | ||
3c0e092e XL |
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 | ||
29967ef6 | 47 | error[E0283]: type annotations needed for `&T` |
ee023bcb | 48 | --> $DIR/issue-72690.rs:17:17 |
f035d41b XL |
49 | | |
50 | LL | 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 | |
61 | error[E0283]: type annotations needed | |
ee023bcb | 62 | --> $DIR/issue-72690.rs:21:5 |
f035d41b XL |
63 | | |
64 | LL | 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 | ||
71 | error[E0283]: type annotations needed | |
ee023bcb | 72 | --> $DIR/issue-72690.rs:21:22 |
136023e0 | 73 | | |
3c0e092e XL |
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; | |
f035d41b XL |
85 | |
86 | error[E0283]: type annotations needed | |
ee023bcb | 87 | --> $DIR/issue-72690.rs:28:5 |
f035d41b XL |
88 | | |
89 | LL | 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 | ||
96 | error[E0283]: type annotations needed | |
ee023bcb | 97 | --> $DIR/issue-72690.rs:28:22 |
136023e0 | 98 | | |
3c0e092e XL |
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; | |
f035d41b XL |
110 | |
111 | error[E0283]: type annotations needed | |
ee023bcb | 112 | --> $DIR/issue-72690.rs:37:5 |
f035d41b XL |
113 | | |
114 | LL | 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 | ||
121 | error[E0283]: type annotations needed | |
ee023bcb | 122 | --> $DIR/issue-72690.rs:37:22 |
136023e0 | 123 | | |
3c0e092e XL |
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; | |
f035d41b | 135 | |
29967ef6 | 136 | error[E0283]: type annotations needed |
ee023bcb | 137 | --> $DIR/issue-72690.rs:46:5 |
f035d41b XL |
138 | | |
139 | LL | 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 | ||
146 | error[E0283]: type annotations needed | |
ee023bcb | 147 | --> $DIR/issue-72690.rs:46:22 |
136023e0 | 148 | | |
3c0e092e XL |
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; | |
f035d41b | 160 | |
29967ef6 | 161 | error[E0283]: type annotations needed |
ee023bcb | 162 | --> $DIR/issue-72690.rs:53:5 |
f035d41b | 163 | | |
f035d41b | 164 | LL | 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 | ||
171 | error[E0283]: type annotations needed | |
ee023bcb | 172 | --> $DIR/issue-72690.rs:53:22 |
136023e0 | 173 | | |
3c0e092e XL |
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; | |
f035d41b | 185 | |
29967ef6 | 186 | error[E0283]: type annotations needed |
ee023bcb | 187 | --> $DIR/issue-72690.rs:62:5 |
f035d41b | 188 | | |
f035d41b | 189 | LL | 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 | ||
196 | error[E0283]: type annotations needed | |
ee023bcb | 197 | --> $DIR/issue-72690.rs:62:22 |
136023e0 | 198 | | |
3c0e092e XL |
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; | |
f035d41b | 210 | |
ee023bcb | 211 | error: aborting due to 17 previous errors |
f035d41b XL |
212 | |
213 | Some errors have detailed explanations: E0282, E0283. | |
214 | For more information about an error, try `rustc --explain E0282`. |