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