]> git.proxmox.com Git - rustc.git/blame - src/test/ui/did_you_mean/bad-assoc-ty.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / did_you_mean / bad-assoc-ty.stderr
CommitLineData
ff7c6d11 1error: missing angle brackets in associated item path
0731742a 2 --> $DIR/bad-assoc-ty.rs:1:10
ff7c6d11 3 |
0531ce1d 4LL | type A = [u8; 4]::AssocTy;
ff7c6d11
XL
5 | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy`
6
7error: missing angle brackets in associated item path
0731742a 8 --> $DIR/bad-assoc-ty.rs:5:10
ff7c6d11 9 |
0531ce1d 10LL | type B = [u8]::AssocTy;
ff7c6d11
XL
11 | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy`
12
13error: missing angle brackets in associated item path
0731742a 14 --> $DIR/bad-assoc-ty.rs:9:10
ff7c6d11 15 |
0531ce1d 16LL | type C = (u8)::AssocTy;
ff7c6d11
XL
17 | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
18
19error: missing angle brackets in associated item path
0731742a 20 --> $DIR/bad-assoc-ty.rs:13:10
ff7c6d11 21 |
0531ce1d 22LL | type D = (u8, u8)::AssocTy;
ff7c6d11
XL
23 | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy`
24
25error: missing angle brackets in associated item path
0731742a 26 --> $DIR/bad-assoc-ty.rs:17:10
ff7c6d11 27 |
0531ce1d 28LL | type E = _::AssocTy;
ff7c6d11
XL
29 | ^^^^^^^^^^ help: try: `<_>::AssocTy`
30
31error: missing angle brackets in associated item path
74b04a01 32 --> $DIR/bad-assoc-ty.rs:21:19
ff7c6d11 33 |
0531ce1d 34LL | type F = &'static (u8)::AssocTy;
ff7c6d11
XL
35 | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
36
37error: missing angle brackets in associated item path
74b04a01 38 --> $DIR/bad-assoc-ty.rs:27:10
ff7c6d11 39 |
dc9dc135
XL
40LL | type G = dyn 'static + (Send)::AssocTy;
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<dyn 'static + (Send)>::AssocTy`
532ac7d7
XL
42
43error: missing angle brackets in associated item path
74b04a01 44 --> $DIR/bad-assoc-ty.rs:44:10
532ac7d7
XL
45 |
46LL | type I = ty!()::AssocTy;
47 | ^^^^^^^^^^^^^^ help: try: `<ty!()>::AssocTy`
48
49error: missing angle brackets in associated item path
74b04a01 50 --> $DIR/bad-assoc-ty.rs:37:19
532ac7d7
XL
51 |
52LL | ($ty: ty) => ($ty::AssocTy);
53 | ^^^^^^^^^^^^ help: try: `<$ty>::AssocTy`
54...
55LL | type J = ty!(u8);
56 | ------- in this macro invocation
74b04a01 57 |
17df50a5 58 = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
74b04a01 59
ff7c6d11 60error[E0223]: ambiguous associated type
0731742a 61 --> $DIR/bad-assoc-ty.rs:1:10
ff7c6d11 62 |
0531ce1d 63LL | type A = [u8; 4]::AssocTy;
dfeec247 64 | ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8; 4] as Trait>::AssocTy`
ff7c6d11
XL
65
66error[E0223]: ambiguous associated type
0731742a 67 --> $DIR/bad-assoc-ty.rs:5:10
ff7c6d11 68 |
0531ce1d 69LL | type B = [u8]::AssocTy;
0bf4aa26 70 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8] as Trait>::AssocTy`
ff7c6d11
XL
71
72error[E0223]: ambiguous associated type
0731742a 73 --> $DIR/bad-assoc-ty.rs:9:10
ff7c6d11 74 |
0531ce1d 75LL | type C = (u8)::AssocTy;
0bf4aa26 76 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
ff7c6d11
XL
77
78error[E0223]: ambiguous associated type
0731742a 79 --> $DIR/bad-assoc-ty.rs:13:10
ff7c6d11 80 |
0531ce1d 81LL | type D = (u8, u8)::AssocTy;
0bf4aa26 82 | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(u8, u8) as Trait>::AssocTy`
ff7c6d11 83
136023e0 84error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases
0731742a 85 --> $DIR/bad-assoc-ty.rs:17:10
ff7c6d11 86 |
0531ce1d 87LL | type E = _::AssocTy;
ff7c6d11
XL
88 | ^ not allowed in type signatures
89
90error[E0223]: ambiguous associated type
74b04a01 91 --> $DIR/bad-assoc-ty.rs:21:19
ff7c6d11 92 |
0531ce1d 93LL | type F = &'static (u8)::AssocTy;
0bf4aa26 94 | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
ff7c6d11
XL
95
96error[E0223]: ambiguous associated type
74b04a01 97 --> $DIR/bad-assoc-ty.rs:27:10
ff7c6d11 98 |
dc9dc135 99LL | type G = dyn 'static + (Send)::AssocTy;
1b1a35ee 100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Send + 'static) as Trait>::AssocTy`
ff7c6d11
XL
101
102error[E0223]: ambiguous associated type
74b04a01 103 --> $DIR/bad-assoc-ty.rs:33:10
ff7c6d11 104 |
0531ce1d 105LL | type H = Fn(u8) -> (u8)::Output;
1b1a35ee 106 | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as Trait>::Output`
ff7c6d11 107
532ac7d7 108error[E0223]: ambiguous associated type
74b04a01 109 --> $DIR/bad-assoc-ty.rs:37:19
532ac7d7
XL
110 |
111LL | ($ty: ty) => ($ty::AssocTy);
112 | ^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
113...
114LL | type J = ty!(u8);
115 | ------- in this macro invocation
74b04a01 116 |
17df50a5 117 = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
532ac7d7
XL
118
119error[E0223]: ambiguous associated type
74b04a01 120 --> $DIR/bad-assoc-ty.rs:44:10
532ac7d7
XL
121 |
122LL | type I = ty!()::AssocTy;
123 | ^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<u8 as Trait>::AssocTy`
124
136023e0 125error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
74b04a01
XL
126 --> $DIR/bad-assoc-ty.rs:49:13
127 |
128LL | fn foo<X: K<_, _>>(x: X) {}
129 | ^ ^ not allowed in type signatures
130 | |
131 | not allowed in type signatures
132 |
133help: use type parameters instead
134 |
ba9703b0
XL
135LL | fn foo<X: K<T, T>, T>(x: X) {}
136 | ^ ^ ^^^
74b04a01 137
136023e0 138error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
74b04a01
XL
139 --> $DIR/bad-assoc-ty.rs:52:34
140 |
141LL | fn bar<F>(_: F) where F: Fn() -> _ {}
142 | ^ not allowed in type signatures
143 |
144help: use type parameters instead
145 |
146LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
147 | ^^^ ^
148
136023e0 149error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
74b04a01
XL
150 --> $DIR/bad-assoc-ty.rs:55:19
151 |
152LL | fn baz<F: Fn() -> _>(_: F) {}
153 | ^ not allowed in type signatures
154 |
155help: use type parameters instead
156 |
ba9703b0
XL
157LL | fn baz<F: Fn() -> T, T>(_: F) {}
158 | ^^^^
74b04a01 159
136023e0 160error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
74b04a01
XL
161 --> $DIR/bad-assoc-ty.rs:58:33
162 |
163LL | struct L<F>(F) where F: Fn() -> _;
164 | ^ not allowed in type signatures
165 |
166help: use type parameters instead
167 |
168LL | struct L<F, T>(F) where F: Fn() -> T;
169 | ^^^ ^
170
136023e0 171error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
74b04a01
XL
172 --> $DIR/bad-assoc-ty.rs:60:30
173 |
174LL | struct M<F> where F: Fn() -> _ {
175 | ^ not allowed in type signatures
176 |
177help: use type parameters instead
178 |
179LL | struct M<F, T> where F: Fn() -> T {
180 | ^^^ ^
181
136023e0 182error[E0121]: the type placeholder `_` is not allowed within types on item signatures for enums
74b04a01
XL
183 --> $DIR/bad-assoc-ty.rs:64:28
184 |
185LL | enum N<F> where F: Fn() -> _ {
186 | ^ not allowed in type signatures
187 |
188help: use type parameters instead
189 |
190LL | enum N<F, T> where F: Fn() -> T {
191 | ^^^ ^
192
136023e0 193error[E0121]: the type placeholder `_` is not allowed within types on item signatures for unions
74b04a01
XL
194 --> $DIR/bad-assoc-ty.rs:69:29
195 |
196LL | union O<F> where F: Fn() -> _ {
197 | ^ not allowed in type signatures
198 |
199help: use type parameters instead
200 |
201LL | union O<F, T> where F: Fn() -> T {
202 | ^^^ ^
203
136023e0 204error[E0121]: the type placeholder `_` is not allowed within types on item signatures for traits
29967ef6 205 --> $DIR/bad-assoc-ty.rs:74:29
74b04a01
XL
206 |
207LL | trait P<F> where F: Fn() -> _ {
208 | ^ not allowed in type signatures
209 |
210help: use type parameters instead
211 |
212LL | trait P<F, T> where F: Fn() -> T {
213 | ^^^ ^
214
136023e0 215error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
29967ef6 216 --> $DIR/bad-assoc-ty.rs:79:38
74b04a01
XL
217 |
218LL | fn foo<F>(_: F) where F: Fn() -> _ {}
219 | ^ not allowed in type signatures
220 |
221help: use type parameters instead
222 |
223LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
224 | ^^^ ^
225
29967ef6 226error: aborting due to 28 previous errors
ff7c6d11 227
29967ef6 228Some errors have detailed explanations: E0121, E0223.
0531ce1d 229For more information about an error, try `rustc --explain E0121`.