1 error: missing angle brackets in associated item path
2 --> $DIR/bad-assoc-ty.rs:1:10
4 LL | type A = [u8; 4]::AssocTy;
5 | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy`
7 error: missing angle brackets in associated item path
8 --> $DIR/bad-assoc-ty.rs:5:10
10 LL | type B = [u8]::AssocTy;
11 | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy`
13 error: missing angle brackets in associated item path
14 --> $DIR/bad-assoc-ty.rs:9:10
16 LL | type C = (u8)::AssocTy;
17 | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
19 error: missing angle brackets in associated item path
20 --> $DIR/bad-assoc-ty.rs:13:10
22 LL | type D = (u8, u8)::AssocTy;
23 | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy`
25 error: missing angle brackets in associated item path
26 --> $DIR/bad-assoc-ty.rs:17:10
28 LL | type E = _::AssocTy;
29 | ^^^^^^^^^^ help: try: `<_>::AssocTy`
31 error: missing angle brackets in associated item path
32 --> $DIR/bad-assoc-ty.rs:21:19
34 LL | type F = &'static (u8)::AssocTy;
35 | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
37 error: missing angle brackets in associated item path
38 --> $DIR/bad-assoc-ty.rs:27:10
40 LL | type G = dyn 'static + (Send)::AssocTy;
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<dyn 'static + (Send)>::AssocTy`
43 error: missing angle brackets in associated item path
44 --> $DIR/bad-assoc-ty.rs:46:10
46 LL | type I = ty!()::AssocTy;
47 | ^^^^^^^^^^^^^^ help: try: `<ty!()>::AssocTy`
49 error: missing angle brackets in associated item path
50 --> $DIR/bad-assoc-ty.rs:39:19
52 LL | ($ty: ty) => ($ty::AssocTy);
53 | ^^^^^^^^^^^^ help: try: `<$ty>::AssocTy`
55 LL | type J = ty!(u8);
56 | ------- in this macro invocation
58 = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
60 error[E0223]: ambiguous associated type
61 --> $DIR/bad-assoc-ty.rs:1:10
63 LL | type A = [u8; 4]::AssocTy;
66 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8; 4]`, you could use the fully-qualified path
68 LL | type A = <[u8; 4] as Example>::AssocTy;
69 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 error[E0223]: ambiguous associated type
72 --> $DIR/bad-assoc-ty.rs:5:10
74 LL | type B = [u8]::AssocTy;
77 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8]`, you could use the fully-qualified path
79 LL | type B = <[u8] as Example>::AssocTy;
80 | ~~~~~~~~~~~~~~~~~~~~~~~~~~
82 error[E0223]: ambiguous associated type
83 --> $DIR/bad-assoc-ty.rs:9:10
85 LL | type C = (u8)::AssocTy;
88 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
90 LL | type C = <u8 as Example>::AssocTy;
91 | ~~~~~~~~~~~~~~~~~~~~~~~~
93 error[E0223]: ambiguous associated type
94 --> $DIR/bad-assoc-ty.rs:13:10
96 LL | type D = (u8, u8)::AssocTy;
99 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(u8, u8)`, you could use the fully-qualified path
101 LL | type D = <(u8, u8) as Example>::AssocTy;
102 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
105 --> $DIR/bad-assoc-ty.rs:17:10
107 LL | type E = _::AssocTy;
108 | ^ not allowed in type signatures
110 error[E0223]: ambiguous associated type
111 --> $DIR/bad-assoc-ty.rs:21:19
113 LL | type F = &'static (u8)::AssocTy;
116 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
118 LL | type F = &'static <u8 as Example>::AssocTy;
119 | ~~~~~~~~~~~~~~~~~~~~~~~~
121 error[E0223]: ambiguous associated type
122 --> $DIR/bad-assoc-ty.rs:27:10
124 LL | type G = dyn 'static + (Send)::AssocTy;
125 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(dyn Send + 'static)`, you could use the fully-qualified path
129 LL | type G = <(dyn Send + 'static) as Example>::AssocTy;
130 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 warning: trait objects without an explicit `dyn` are deprecated
133 --> $DIR/bad-assoc-ty.rs:33:10
135 LL | type H = Fn(u8) -> (u8)::Output;
138 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
139 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
140 = note: `#[warn(bare_trait_objects)]` on by default
143 LL | type H = <dyn Fn(u8) -> (u8)>::Output;
146 error[E0223]: ambiguous associated type
147 --> $DIR/bad-assoc-ty.rs:33:10
149 LL | type H = Fn(u8) -> (u8)::Output;
150 | ^^^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`
152 error[E0223]: ambiguous associated type
153 --> $DIR/bad-assoc-ty.rs:39:19
155 LL | ($ty: ty) => ($ty::AssocTy);
158 LL | type J = ty!(u8);
159 | ------- in this macro invocation
161 = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
162 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
164 LL | ($ty: ty) => (<u8 as Example>::AssocTy);
165 | ~~~~~~~~~~~~~~~~~~~~~~~~
167 error[E0223]: ambiguous associated type
168 --> $DIR/bad-assoc-ty.rs:46:10
170 LL | type I = ty!()::AssocTy;
173 help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
175 LL | type I = <u8 as Example>::AssocTy;
176 | ~~~~~~~~~~~~~~~~~~~~~~~~
178 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
179 --> $DIR/bad-assoc-ty.rs:51:13
181 LL | fn foo<X: K<_, _>>(x: X) {}
182 | ^ ^ not allowed in type signatures
184 | not allowed in type signatures
186 help: use type parameters instead
188 LL | fn foo<X: K<T, T>, T>(x: X) {}
191 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
192 --> $DIR/bad-assoc-ty.rs:54:34
194 LL | fn bar<F>(_: F) where F: Fn() -> _ {}
195 | ^ not allowed in type signatures
197 help: use type parameters instead
199 LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
202 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
203 --> $DIR/bad-assoc-ty.rs:57:19
205 LL | fn baz<F: Fn() -> _>(_: F) {}
206 | ^ not allowed in type signatures
208 help: use type parameters instead
210 LL | fn baz<F: Fn() -> T, T>(_: F) {}
213 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
214 --> $DIR/bad-assoc-ty.rs:60:33
216 LL | struct L<F>(F) where F: Fn() -> _;
217 | ^ not allowed in type signatures
219 help: use type parameters instead
221 LL | struct L<F, T>(F) where F: Fn() -> T;
224 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
225 --> $DIR/bad-assoc-ty.rs:62:30
227 LL | struct M<F> where F: Fn() -> _ {
228 | ^ not allowed in type signatures
230 help: use type parameters instead
232 LL | struct M<F, T> where F: Fn() -> T {
235 error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
236 --> $DIR/bad-assoc-ty.rs:66:28
238 LL | enum N<F> where F: Fn() -> _ {
239 | ^ not allowed in type signatures
241 help: use type parameters instead
243 LL | enum N<F, T> where F: Fn() -> T {
246 error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
247 --> $DIR/bad-assoc-ty.rs:71:29
249 LL | union O<F> where F: Fn() -> _ {
250 | ^ not allowed in type signatures
252 help: use type parameters instead
254 LL | union O<F, T> where F: Fn() -> T {
257 error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
258 --> $DIR/bad-assoc-ty.rs:76:29
260 LL | trait P<F> where F: Fn() -> _ {
261 | ^ not allowed in type signatures
263 help: use type parameters instead
265 LL | trait P<F, T> where F: Fn() -> T {
268 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
269 --> $DIR/bad-assoc-ty.rs:81:38
271 LL | fn foo<F>(_: F) where F: Fn() -> _ {}
272 | ^ not allowed in type signatures
274 help: use type parameters instead
276 LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
279 error: aborting due to 28 previous errors; 1 warning emitted
281 Some errors have detailed explanations: E0121, E0223.
282 For more information about an error, try `rustc --explain E0121`.