fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
10.7 KiB326 linesraw
1error: missing angle brackets in associated item path
2  --> $DIR/bad-assoc-ty.rs:1:10
3   |
4LL | type A = [u8; 4]::AssocTy;
5   |          ^^^^^^^
6   |
7help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
8   |
9LL | type A = <[u8; 4]>::AssocTy;
10   |          +       +
11
12error: missing angle brackets in associated item path
13  --> $DIR/bad-assoc-ty.rs:5:10
14   |
15LL | type B = [u8]::AssocTy;
16   |          ^^^^
17   |
18help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
19   |
20LL | type B = <[u8]>::AssocTy;
21   |          +    +
22
23error: missing angle brackets in associated item path
24  --> $DIR/bad-assoc-ty.rs:9:10
25   |
26LL | type C = (u8)::AssocTy;
27   |          ^^^^
28   |
29help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
30   |
31LL | type C = <(u8)>::AssocTy;
32   |          +    +
33
34error: missing angle brackets in associated item path
35  --> $DIR/bad-assoc-ty.rs:13:10
36   |
37LL | type D = (u8, u8)::AssocTy;
38   |          ^^^^^^^^
39   |
40help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
41   |
42LL | type D = <(u8, u8)>::AssocTy;
43   |          +        +
44
45error: missing angle brackets in associated item path
46  --> $DIR/bad-assoc-ty.rs:17:10
47   |
48LL | type E = _::AssocTy;
49   |          ^
50   |
51help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
52   |
53LL | type E = <_>::AssocTy;
54   |          + +
55
56error: missing angle brackets in associated item path
57  --> $DIR/bad-assoc-ty.rs:21:19
58   |
59LL | type F = &'static (u8)::AssocTy;
60   |                   ^^^^
61   |
62help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
63   |
64LL | type F = &'static <(u8)>::AssocTy;
65   |                   +    +
66
67error: missing angle brackets in associated item path
68  --> $DIR/bad-assoc-ty.rs:27:10
69   |
70LL | type G = dyn 'static + (Send)::AssocTy;
71   |          ^^^^^^^^^^^^^^^^^^^^
72   |
73help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
74   |
75LL | type G = <dyn 'static + (Send)>::AssocTy;
76   |          +                    +
77
78error: missing angle brackets in associated item path
79  --> $DIR/bad-assoc-ty.rs:46:10
80   |
81LL | type I = ty!()::AssocTy;
82   |          ^^^^^
83   |
84help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
85   |
86LL | type I = <ty!()>::AssocTy;
87   |          +     +
88
89error: missing angle brackets in associated item path
90  --> $DIR/bad-assoc-ty.rs:39:19
91   |
92LL |     ($ty: ty) => ($ty::AssocTy);
93   |                   ^^^
94...
95LL | type J = ty!(u8);
96   |          ------- in this macro invocation
97   |
98   = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
99help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
100   |
101LL |     ($ty: ty) => (<$ty>::AssocTy);
102   |                   +   +
103
104error[E0223]: ambiguous associated type
105  --> $DIR/bad-assoc-ty.rs:1:10
106   |
107LL | type A = [u8; 4]::AssocTy;
108   |          ^^^^^^^^^^^^^^^^
109   |
110help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8; 4]`, you could use the fully-qualified path
111   |
112LL | type A = <[u8; 4] as Example>::AssocTy;
113   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114
115error[E0223]: ambiguous associated type
116  --> $DIR/bad-assoc-ty.rs:5:10
117   |
118LL | type B = [u8]::AssocTy;
119   |          ^^^^^^^^^^^^^
120   |
121help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8]`, you could use the fully-qualified path
122   |
123LL | type B = <[u8] as Example>::AssocTy;
124   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~
125
126error[E0223]: ambiguous associated type
127  --> $DIR/bad-assoc-ty.rs:9:10
128   |
129LL | type C = (u8)::AssocTy;
130   |          ^^^^^^^^^^^^^
131   |
132help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
133   |
134LL | type C = <u8 as Example>::AssocTy;
135   |          ~~~~~~~~~~~~~~~~~~~~~~~~
136
137error[E0223]: ambiguous associated type
138  --> $DIR/bad-assoc-ty.rs:13:10
139   |
140LL | type D = (u8, u8)::AssocTy;
141   |          ^^^^^^^^^^^^^^^^^
142   |
143help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(u8, u8)`, you could use the fully-qualified path
144   |
145LL | type D = <(u8, u8) as Example>::AssocTy;
146   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
148error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
149  --> $DIR/bad-assoc-ty.rs:17:10
150   |
151LL | type E = _::AssocTy;
152   |          ^ not allowed in type signatures
153
154error[E0223]: ambiguous associated type
155  --> $DIR/bad-assoc-ty.rs:21:19
156   |
157LL | type F = &'static (u8)::AssocTy;
158   |                   ^^^^^^^^^^^^^
159   |
160help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
161   |
162LL | type F = &'static <u8 as Example>::AssocTy;
163   |                   ~~~~~~~~~~~~~~~~~~~~~~~~
164
165error[E0223]: ambiguous associated type
166  --> $DIR/bad-assoc-ty.rs:27:10
167   |
168LL | type G = dyn 'static + (Send)::AssocTy;
169   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170   |
171help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(dyn Send + 'static)`, you could use the fully-qualified path
172   |
173LL | type G = <(dyn Send + 'static) as Example>::AssocTy;
174   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175
176warning: trait objects without an explicit `dyn` are deprecated
177  --> $DIR/bad-assoc-ty.rs:33:10
178   |
179LL | type H = Fn(u8) -> (u8)::Output;
180   |          ^^^^^^^^^^^^^^
181   |
182   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
183   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
184   = note: `#[warn(bare_trait_objects)]` on by default
185help: use `dyn`
186   |
187LL | type H = <dyn Fn(u8) -> (u8)>::Output;
188   |          ++++               +
189
190error[E0223]: ambiguous associated type
191  --> $DIR/bad-assoc-ty.rs:33:10
192   |
193LL | type H = Fn(u8) -> (u8)::Output;
194   |          ^^^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`
195
196error[E0223]: ambiguous associated type
197  --> $DIR/bad-assoc-ty.rs:39:19
198   |
199LL |     ($ty: ty) => ($ty::AssocTy);
200   |                   ^^^^^^^^^^^^
201...
202LL | type J = ty!(u8);
203   |          ------- in this macro invocation
204   |
205   = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
206help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
207   |
208LL |     ($ty: ty) => (<u8 as Example>::AssocTy);
209   |                   ~~~~~~~~~~~~~~~~~~~~~~~~
210
211error[E0223]: ambiguous associated type
212  --> $DIR/bad-assoc-ty.rs:46:10
213   |
214LL | type I = ty!()::AssocTy;
215   |          ^^^^^^^^^^^^^^
216   |
217help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
218   |
219LL | type I = <u8 as Example>::AssocTy;
220   |          ~~~~~~~~~~~~~~~~~~~~~~~~
221
222error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
223  --> $DIR/bad-assoc-ty.rs:51:13
224   |
225LL | fn foo<X: K<_, _>>(x: X) {}
226   |             ^  ^ not allowed in type signatures
227   |             |
228   |             not allowed in type signatures
229   |
230help: use type parameters instead
231   |
232LL | fn foo<X: K<T, T>, T>(x: X) {}
233   |             ~  ~ +++
234
235error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
236  --> $DIR/bad-assoc-ty.rs:54:34
237   |
238LL | fn bar<F>(_: F) where F: Fn() -> _ {}
239   |                                  ^ not allowed in type signatures
240   |
241help: use type parameters instead
242   |
243LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
244   |         +++                         ~
245
246error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
247  --> $DIR/bad-assoc-ty.rs:57:19
248   |
249LL | fn baz<F: Fn() -> _>(_: F) {}
250   |                   ^ not allowed in type signatures
251   |
252help: use type parameters instead
253   |
254LL | fn baz<F: Fn() -> T, T>(_: F) {}
255   |                   ~+++
256
257error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
258  --> $DIR/bad-assoc-ty.rs:60:33
259   |
260LL | struct L<F>(F) where F: Fn() -> _;
261   |                                 ^ not allowed in type signatures
262   |
263help: use type parameters instead
264   |
265LL | struct L<F, T>(F) where F: Fn() -> T;
266   |           +++                      ~
267
268error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
269  --> $DIR/bad-assoc-ty.rs:62:30
270   |
271LL | struct M<F> where F: Fn() -> _ {
272   |                              ^ not allowed in type signatures
273   |
274help: use type parameters instead
275   |
276LL | struct M<F, T> where F: Fn() -> T {
277   |           +++                   ~
278
279error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
280  --> $DIR/bad-assoc-ty.rs:66:28
281   |
282LL | enum N<F> where F: Fn() -> _ {
283   |                            ^ not allowed in type signatures
284   |
285help: use type parameters instead
286   |
287LL | enum N<F, T> where F: Fn() -> T {
288   |         +++                   ~
289
290error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
291  --> $DIR/bad-assoc-ty.rs:71:29
292   |
293LL | union O<F> where F: Fn() -> _ {
294   |                             ^ not allowed in type signatures
295   |
296help: use type parameters instead
297   |
298LL | union O<F, T> where F: Fn() -> T {
299   |          +++                   ~
300
301error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
302  --> $DIR/bad-assoc-ty.rs:76:29
303   |
304LL | trait P<F> where F: Fn() -> _ {
305   |                             ^ not allowed in type signatures
306   |
307help: use type parameters instead
308   |
309LL | trait P<F, T> where F: Fn() -> T {
310   |          +++                   ~
311
312error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
313  --> $DIR/bad-assoc-ty.rs:81:38
314   |
315LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
316   |                                      ^ not allowed in type signatures
317   |
318help: use type parameters instead
319   |
320LL |     fn foo<F, T>(_: F) where F: Fn() -> T {}
321   |             +++                         ~
322
323error: aborting due to 28 previous errors; 1 warning emitted
324
325Some errors have detailed explanations: E0121, E0223.
326For more information about an error, try `rustc --explain E0121`.