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:44: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:37: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 a macro (in Nightly builds, run with -Z macro-backtrace for more info)
60 error[E0658]: unions with non-`Copy` fields are unstable
61 --> $DIR/bad-assoc-ty.rs:69:1
63 LL | / union O<F> where F: Fn() -> _ {
70 = note: see issue #55149 <https://github.com/rust-lang/rust/issues/55149> for more information
71 = help: add `#![feature(untagged_unions)]` to the crate attributes to enable
73 error[E0223]: ambiguous associated type
74 --> $DIR/bad-assoc-ty.rs:1:10
76 LL | type A = [u8; 4]::AssocTy;
77 | ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8; 4] as Trait>::AssocTy`
79 error[E0223]: ambiguous associated type
80 --> $DIR/bad-assoc-ty.rs:5:10
82 LL | type B = [u8]::AssocTy;
83 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8] as Trait>::AssocTy`
85 error[E0223]: ambiguous associated type
86 --> $DIR/bad-assoc-ty.rs:9:10
88 LL | type C = (u8)::AssocTy;
89 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
91 error[E0223]: ambiguous associated type
92 --> $DIR/bad-assoc-ty.rs:13:10
94 LL | type D = (u8, u8)::AssocTy;
95 | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(u8, u8) as Trait>::AssocTy`
97 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
98 --> $DIR/bad-assoc-ty.rs:17:10
100 LL | type E = _::AssocTy;
101 | ^ not allowed in type signatures
103 error[E0223]: ambiguous associated type
104 --> $DIR/bad-assoc-ty.rs:21:19
106 LL | type F = &'static (u8)::AssocTy;
107 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
109 error[E0223]: ambiguous associated type
110 --> $DIR/bad-assoc-ty.rs:27:10
112 LL | type G = dyn 'static + (Send)::AssocTy;
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Send + 'static) as Trait>::AssocTy`
115 error[E0223]: ambiguous associated type
116 --> $DIR/bad-assoc-ty.rs:33:10
118 LL | type H = Fn(u8) -> (u8)::Output;
119 | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as Trait>::Output`
121 error[E0223]: ambiguous associated type
122 --> $DIR/bad-assoc-ty.rs:37:19
124 LL | ($ty: ty) => ($ty::AssocTy);
125 | ^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
127 LL | type J = ty!(u8);
128 | ------- in this macro invocation
130 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
132 error[E0223]: ambiguous associated type
133 --> $DIR/bad-assoc-ty.rs:44:10
135 LL | type I = ty!()::AssocTy;
136 | ^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
138 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
139 --> $DIR/bad-assoc-ty.rs:49:13
141 LL | fn foo<X: K<_, _>>(x: X) {}
142 | ^ ^ not allowed in type signatures
144 | not allowed in type signatures
146 help: use type parameters instead
148 LL | fn foo<X: K<T, T>, T>(x: X) {}
151 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
152 --> $DIR/bad-assoc-ty.rs:52:34
154 LL | fn bar<F>(_: F) where F: Fn() -> _ {}
155 | ^ not allowed in type signatures
157 help: use type parameters instead
159 LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
162 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
163 --> $DIR/bad-assoc-ty.rs:55:19
165 LL | fn baz<F: Fn() -> _>(_: F) {}
166 | ^ not allowed in type signatures
168 help: use type parameters instead
170 LL | fn baz<F: Fn() -> T, T>(_: F) {}
173 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
174 --> $DIR/bad-assoc-ty.rs:58:33
176 LL | struct L<F>(F) where F: Fn() -> _;
177 | ^ not allowed in type signatures
179 help: use type parameters instead
181 LL | struct L<F, T>(F) where F: Fn() -> T;
184 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
185 --> $DIR/bad-assoc-ty.rs:60:30
187 LL | struct M<F> where F: Fn() -> _ {
188 | ^ not allowed in type signatures
190 help: use type parameters instead
192 LL | struct M<F, T> where F: Fn() -> T {
195 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
196 --> $DIR/bad-assoc-ty.rs:64:28
198 LL | enum N<F> where F: Fn() -> _ {
199 | ^ not allowed in type signatures
201 help: use type parameters instead
203 LL | enum N<F, T> where F: Fn() -> T {
206 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
207 --> $DIR/bad-assoc-ty.rs:69:29
209 LL | union O<F> where F: Fn() -> _ {
210 | ^ not allowed in type signatures
212 help: use type parameters instead
214 LL | union O<F, T> where F: Fn() -> T {
217 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
218 --> $DIR/bad-assoc-ty.rs:75:29
220 LL | trait P<F> where F: Fn() -> _ {
221 | ^ not allowed in type signatures
223 help: use type parameters instead
225 LL | trait P<F, T> where F: Fn() -> T {
228 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
229 --> $DIR/bad-assoc-ty.rs:80:38
231 LL | fn foo<F>(_: F) where F: Fn() -> _ {}
232 | ^ not allowed in type signatures
234 help: use type parameters instead
236 LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
239 error: aborting due to 29 previous errors
241 Some errors have detailed explanations: E0121, E0223, E0658.
242 For more information about an error, try `rustc --explain E0121`.