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;
64 | ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8; 4] as Trait>::AssocTy`
66 error[E0223]: ambiguous associated type
67 --> $DIR/bad-assoc-ty.rs:5:10
69 LL | type B = [u8]::AssocTy;
70 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8] as Trait>::AssocTy`
72 error[E0223]: ambiguous associated type
73 --> $DIR/bad-assoc-ty.rs:9:10
75 LL | type C = (u8)::AssocTy;
76 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
78 error[E0223]: ambiguous associated type
79 --> $DIR/bad-assoc-ty.rs:13:10
81 LL | type D = (u8, u8)::AssocTy;
82 | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(u8, u8) as Trait>::AssocTy`
84 error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
85 --> $DIR/bad-assoc-ty.rs:17:10
87 LL | type E = _::AssocTy;
88 | ^ not allowed in type signatures
90 error[E0223]: ambiguous associated type
91 --> $DIR/bad-assoc-ty.rs:21:19
93 LL | type F = &'static (u8)::AssocTy;
94 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
96 error[E0223]: ambiguous associated type
97 --> $DIR/bad-assoc-ty.rs:27:10
99 LL | type G = dyn 'static + (Send)::AssocTy;
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Send + 'static) as Trait>::AssocTy`
102 warning: trait objects without an explicit `dyn` are deprecated
103 --> $DIR/bad-assoc-ty.rs:33:10
105 LL | type H = Fn(u8) -> (u8)::Output;
108 = note: `#[warn(bare_trait_objects)]` on by default
109 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
110 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
113 LL | type H = <dyn Fn(u8) -> (u8)>::Output;
116 error[E0223]: ambiguous associated type
117 --> $DIR/bad-assoc-ty.rs:33:10
119 LL | type H = Fn(u8) -> (u8)::Output;
120 | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as Trait>::Output`
122 error[E0223]: ambiguous associated type
123 --> $DIR/bad-assoc-ty.rs:39:19
125 LL | ($ty: ty) => ($ty::AssocTy);
126 | ^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
128 LL | type J = ty!(u8);
129 | ------- in this macro invocation
131 = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
133 error[E0223]: ambiguous associated type
134 --> $DIR/bad-assoc-ty.rs:46:10
136 LL | type I = ty!()::AssocTy;
137 | ^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
139 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
140 --> $DIR/bad-assoc-ty.rs:51:13
142 LL | fn foo<X: K<_, _>>(x: X) {}
143 | ^ ^ not allowed in type signatures
145 | not allowed in type signatures
147 help: use type parameters instead
149 LL | fn foo<X: K<T, T>, T>(x: X) {}
152 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
153 --> $DIR/bad-assoc-ty.rs:54:34
155 LL | fn bar<F>(_: F) where F: Fn() -> _ {}
156 | ^ not allowed in type signatures
158 help: use type parameters instead
160 LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
163 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
164 --> $DIR/bad-assoc-ty.rs:57:19
166 LL | fn baz<F: Fn() -> _>(_: F) {}
167 | ^ not allowed in type signatures
169 help: use type parameters instead
171 LL | fn baz<F: Fn() -> T, T>(_: F) {}
174 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
175 --> $DIR/bad-assoc-ty.rs:60:33
177 LL | struct L<F>(F) where F: Fn() -> _;
178 | ^ not allowed in type signatures
180 help: use type parameters instead
182 LL | struct L<F, T>(F) where F: Fn() -> T;
185 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
186 --> $DIR/bad-assoc-ty.rs:62:30
188 LL | struct M<F> where F: Fn() -> _ {
189 | ^ not allowed in type signatures
191 help: use type parameters instead
193 LL | struct M<F, T> where F: Fn() -> T {
196 error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
197 --> $DIR/bad-assoc-ty.rs:66:28
199 LL | enum N<F> where F: Fn() -> _ {
200 | ^ not allowed in type signatures
202 help: use type parameters instead
204 LL | enum N<F, T> where F: Fn() -> T {
207 error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
208 --> $DIR/bad-assoc-ty.rs:71:29
210 LL | union O<F> where F: Fn() -> _ {
211 | ^ not allowed in type signatures
213 help: use type parameters instead
215 LL | union O<F, T> where F: Fn() -> T {
218 error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
219 --> $DIR/bad-assoc-ty.rs:76:29
221 LL | trait P<F> where F: Fn() -> _ {
222 | ^ not allowed in type signatures
224 help: use type parameters instead
226 LL | trait P<F, T> where F: Fn() -> T {
229 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
230 --> $DIR/bad-assoc-ty.rs:81:38
232 LL | fn foo<F>(_: F) where F: Fn() -> _ {}
233 | ^ not allowed in type signatures
235 help: use type parameters instead
237 LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
240 error: aborting due to 28 previous errors; 1 warning emitted
242 Some errors have detailed explanations: E0121, E0223.
243 For more information about an error, try `rustc --explain E0121`.