1 | // This file is @generated by syn-internal-codegen. |
2 | // It is not intended for manual editing. |
3 | |
4 | #![allow (unknown_lints, non_local_definitions)] |
5 | use std::fmt::{self, Debug}; |
6 | #[cfg (any(feature = "derive" , feature = "full" ))] |
7 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
8 | impl Debug for crate::Abi { |
9 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
10 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Abi" ); |
11 | formatter.field(name:"extern_token" , &self.extern_token); |
12 | formatter.field(name:"name" , &self.name); |
13 | formatter.finish() |
14 | } |
15 | } |
16 | #[cfg (any(feature = "derive" , feature = "full" ))] |
17 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
18 | impl Debug for crate::AngleBracketedGenericArguments { |
19 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
20 | self.debug(formatter, name:"AngleBracketedGenericArguments" ) |
21 | } |
22 | } |
23 | #[cfg (any(feature = "derive" , feature = "full" ))] |
24 | impl crate::AngleBracketedGenericArguments { |
25 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
26 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
27 | formatter.field(name:"colon2_token" , &self.colon2_token); |
28 | formatter.field(name:"lt_token" , &self.lt_token); |
29 | formatter.field(name:"args" , &self.args); |
30 | formatter.field(name:"gt_token" , &self.gt_token); |
31 | formatter.finish() |
32 | } |
33 | } |
34 | #[cfg (feature = "full" )] |
35 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
36 | impl Debug for crate::Arm { |
37 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
38 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Arm" ); |
39 | formatter.field(name:"attrs" , &self.attrs); |
40 | formatter.field(name:"pat" , &self.pat); |
41 | formatter.field(name:"guard" , &self.guard); |
42 | formatter.field(name:"fat_arrow_token" , &self.fat_arrow_token); |
43 | formatter.field(name:"body" , &self.body); |
44 | formatter.field(name:"comma" , &self.comma); |
45 | formatter.finish() |
46 | } |
47 | } |
48 | #[cfg (any(feature = "derive" , feature = "full" ))] |
49 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
50 | impl Debug for crate::AssocConst { |
51 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
52 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"AssocConst" ); |
53 | formatter.field(name:"ident" , &self.ident); |
54 | formatter.field(name:"generics" , &self.generics); |
55 | formatter.field(name:"eq_token" , &self.eq_token); |
56 | formatter.field(name:"value" , &self.value); |
57 | formatter.finish() |
58 | } |
59 | } |
60 | #[cfg (any(feature = "derive" , feature = "full" ))] |
61 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
62 | impl Debug for crate::AssocType { |
63 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
64 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"AssocType" ); |
65 | formatter.field(name:"ident" , &self.ident); |
66 | formatter.field(name:"generics" , &self.generics); |
67 | formatter.field(name:"eq_token" , &self.eq_token); |
68 | formatter.field(name:"ty" , &self.ty); |
69 | formatter.finish() |
70 | } |
71 | } |
72 | #[cfg (any(feature = "derive" , feature = "full" ))] |
73 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
74 | impl Debug for crate::AttrStyle { |
75 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
76 | formatter.write_str(data:"AttrStyle::" )?; |
77 | match self { |
78 | crate::AttrStyle::Outer => formatter.write_str(data:"Outer" ), |
79 | crate::AttrStyle::Inner(v0: &Not) => { |
80 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Inner" ); |
81 | formatter.field(v0); |
82 | formatter.finish() |
83 | } |
84 | } |
85 | } |
86 | } |
87 | #[cfg (any(feature = "derive" , feature = "full" ))] |
88 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
89 | impl Debug for crate::Attribute { |
90 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
91 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Attribute" ); |
92 | formatter.field(name:"pound_token" , &self.pound_token); |
93 | formatter.field(name:"style" , &self.style); |
94 | formatter.field(name:"bracket_token" , &self.bracket_token); |
95 | formatter.field(name:"meta" , &self.meta); |
96 | formatter.finish() |
97 | } |
98 | } |
99 | #[cfg (any(feature = "derive" , feature = "full" ))] |
100 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
101 | impl Debug for crate::BareFnArg { |
102 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
103 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"BareFnArg" ); |
104 | formatter.field(name:"attrs" , &self.attrs); |
105 | formatter.field(name:"name" , &self.name); |
106 | formatter.field(name:"ty" , &self.ty); |
107 | formatter.finish() |
108 | } |
109 | } |
110 | #[cfg (any(feature = "derive" , feature = "full" ))] |
111 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
112 | impl Debug for crate::BareVariadic { |
113 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
114 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"BareVariadic" ); |
115 | formatter.field(name:"attrs" , &self.attrs); |
116 | formatter.field(name:"name" , &self.name); |
117 | formatter.field(name:"dots" , &self.dots); |
118 | formatter.field(name:"comma" , &self.comma); |
119 | formatter.finish() |
120 | } |
121 | } |
122 | #[cfg (any(feature = "derive" , feature = "full" ))] |
123 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
124 | impl Debug for crate::BinOp { |
125 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
126 | formatter.write_str("BinOp::" )?; |
127 | match self { |
128 | crate::BinOp::Add(v0) => { |
129 | let mut formatter = formatter.debug_tuple("Add" ); |
130 | formatter.field(v0); |
131 | formatter.finish() |
132 | } |
133 | crate::BinOp::Sub(v0) => { |
134 | let mut formatter = formatter.debug_tuple("Sub" ); |
135 | formatter.field(v0); |
136 | formatter.finish() |
137 | } |
138 | crate::BinOp::Mul(v0) => { |
139 | let mut formatter = formatter.debug_tuple("Mul" ); |
140 | formatter.field(v0); |
141 | formatter.finish() |
142 | } |
143 | crate::BinOp::Div(v0) => { |
144 | let mut formatter = formatter.debug_tuple("Div" ); |
145 | formatter.field(v0); |
146 | formatter.finish() |
147 | } |
148 | crate::BinOp::Rem(v0) => { |
149 | let mut formatter = formatter.debug_tuple("Rem" ); |
150 | formatter.field(v0); |
151 | formatter.finish() |
152 | } |
153 | crate::BinOp::And(v0) => { |
154 | let mut formatter = formatter.debug_tuple("And" ); |
155 | formatter.field(v0); |
156 | formatter.finish() |
157 | } |
158 | crate::BinOp::Or(v0) => { |
159 | let mut formatter = formatter.debug_tuple("Or" ); |
160 | formatter.field(v0); |
161 | formatter.finish() |
162 | } |
163 | crate::BinOp::BitXor(v0) => { |
164 | let mut formatter = formatter.debug_tuple("BitXor" ); |
165 | formatter.field(v0); |
166 | formatter.finish() |
167 | } |
168 | crate::BinOp::BitAnd(v0) => { |
169 | let mut formatter = formatter.debug_tuple("BitAnd" ); |
170 | formatter.field(v0); |
171 | formatter.finish() |
172 | } |
173 | crate::BinOp::BitOr(v0) => { |
174 | let mut formatter = formatter.debug_tuple("BitOr" ); |
175 | formatter.field(v0); |
176 | formatter.finish() |
177 | } |
178 | crate::BinOp::Shl(v0) => { |
179 | let mut formatter = formatter.debug_tuple("Shl" ); |
180 | formatter.field(v0); |
181 | formatter.finish() |
182 | } |
183 | crate::BinOp::Shr(v0) => { |
184 | let mut formatter = formatter.debug_tuple("Shr" ); |
185 | formatter.field(v0); |
186 | formatter.finish() |
187 | } |
188 | crate::BinOp::Eq(v0) => { |
189 | let mut formatter = formatter.debug_tuple("Eq" ); |
190 | formatter.field(v0); |
191 | formatter.finish() |
192 | } |
193 | crate::BinOp::Lt(v0) => { |
194 | let mut formatter = formatter.debug_tuple("Lt" ); |
195 | formatter.field(v0); |
196 | formatter.finish() |
197 | } |
198 | crate::BinOp::Le(v0) => { |
199 | let mut formatter = formatter.debug_tuple("Le" ); |
200 | formatter.field(v0); |
201 | formatter.finish() |
202 | } |
203 | crate::BinOp::Ne(v0) => { |
204 | let mut formatter = formatter.debug_tuple("Ne" ); |
205 | formatter.field(v0); |
206 | formatter.finish() |
207 | } |
208 | crate::BinOp::Ge(v0) => { |
209 | let mut formatter = formatter.debug_tuple("Ge" ); |
210 | formatter.field(v0); |
211 | formatter.finish() |
212 | } |
213 | crate::BinOp::Gt(v0) => { |
214 | let mut formatter = formatter.debug_tuple("Gt" ); |
215 | formatter.field(v0); |
216 | formatter.finish() |
217 | } |
218 | crate::BinOp::AddAssign(v0) => { |
219 | let mut formatter = formatter.debug_tuple("AddAssign" ); |
220 | formatter.field(v0); |
221 | formatter.finish() |
222 | } |
223 | crate::BinOp::SubAssign(v0) => { |
224 | let mut formatter = formatter.debug_tuple("SubAssign" ); |
225 | formatter.field(v0); |
226 | formatter.finish() |
227 | } |
228 | crate::BinOp::MulAssign(v0) => { |
229 | let mut formatter = formatter.debug_tuple("MulAssign" ); |
230 | formatter.field(v0); |
231 | formatter.finish() |
232 | } |
233 | crate::BinOp::DivAssign(v0) => { |
234 | let mut formatter = formatter.debug_tuple("DivAssign" ); |
235 | formatter.field(v0); |
236 | formatter.finish() |
237 | } |
238 | crate::BinOp::RemAssign(v0) => { |
239 | let mut formatter = formatter.debug_tuple("RemAssign" ); |
240 | formatter.field(v0); |
241 | formatter.finish() |
242 | } |
243 | crate::BinOp::BitXorAssign(v0) => { |
244 | let mut formatter = formatter.debug_tuple("BitXorAssign" ); |
245 | formatter.field(v0); |
246 | formatter.finish() |
247 | } |
248 | crate::BinOp::BitAndAssign(v0) => { |
249 | let mut formatter = formatter.debug_tuple("BitAndAssign" ); |
250 | formatter.field(v0); |
251 | formatter.finish() |
252 | } |
253 | crate::BinOp::BitOrAssign(v0) => { |
254 | let mut formatter = formatter.debug_tuple("BitOrAssign" ); |
255 | formatter.field(v0); |
256 | formatter.finish() |
257 | } |
258 | crate::BinOp::ShlAssign(v0) => { |
259 | let mut formatter = formatter.debug_tuple("ShlAssign" ); |
260 | formatter.field(v0); |
261 | formatter.finish() |
262 | } |
263 | crate::BinOp::ShrAssign(v0) => { |
264 | let mut formatter = formatter.debug_tuple("ShrAssign" ); |
265 | formatter.field(v0); |
266 | formatter.finish() |
267 | } |
268 | } |
269 | } |
270 | } |
271 | #[cfg (feature = "full" )] |
272 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
273 | impl Debug for crate::Block { |
274 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
275 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Block" ); |
276 | formatter.field(name:"brace_token" , &self.brace_token); |
277 | formatter.field(name:"stmts" , &self.stmts); |
278 | formatter.finish() |
279 | } |
280 | } |
281 | #[cfg (any(feature = "derive" , feature = "full" ))] |
282 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
283 | impl Debug for crate::BoundLifetimes { |
284 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
285 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"BoundLifetimes" ); |
286 | formatter.field(name:"for_token" , &self.for_token); |
287 | formatter.field(name:"lt_token" , &self.lt_token); |
288 | formatter.field(name:"lifetimes" , &self.lifetimes); |
289 | formatter.field(name:"gt_token" , &self.gt_token); |
290 | formatter.finish() |
291 | } |
292 | } |
293 | #[cfg (any(feature = "derive" , feature = "full" ))] |
294 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
295 | impl Debug for crate::ConstParam { |
296 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
297 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"ConstParam" ); |
298 | formatter.field(name:"attrs" , &self.attrs); |
299 | formatter.field(name:"const_token" , &self.const_token); |
300 | formatter.field(name:"ident" , &self.ident); |
301 | formatter.field(name:"colon_token" , &self.colon_token); |
302 | formatter.field(name:"ty" , &self.ty); |
303 | formatter.field(name:"eq_token" , &self.eq_token); |
304 | formatter.field(name:"default" , &self.default); |
305 | formatter.finish() |
306 | } |
307 | } |
308 | #[cfg (any(feature = "derive" , feature = "full" ))] |
309 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
310 | impl Debug for crate::Constraint { |
311 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
312 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Constraint" ); |
313 | formatter.field(name:"ident" , &self.ident); |
314 | formatter.field(name:"generics" , &self.generics); |
315 | formatter.field(name:"colon_token" , &self.colon_token); |
316 | formatter.field(name:"bounds" , &self.bounds); |
317 | formatter.finish() |
318 | } |
319 | } |
320 | #[cfg (feature = "derive" )] |
321 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
322 | impl Debug for crate::Data { |
323 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
324 | formatter.write_str(data:"Data::" )?; |
325 | match self { |
326 | crate::Data::Struct(v0: &DataStruct) => v0.debug(formatter, name:"Struct" ), |
327 | crate::Data::Enum(v0: &DataEnum) => v0.debug(formatter, name:"Enum" ), |
328 | crate::Data::Union(v0: &DataUnion) => v0.debug(formatter, name:"Union" ), |
329 | } |
330 | } |
331 | } |
332 | #[cfg (feature = "derive" )] |
333 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
334 | impl Debug for crate::DataEnum { |
335 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
336 | self.debug(formatter, name:"DataEnum" ) |
337 | } |
338 | } |
339 | #[cfg (feature = "derive" )] |
340 | impl crate::DataEnum { |
341 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
342 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
343 | formatter.field(name:"enum_token" , &self.enum_token); |
344 | formatter.field(name:"brace_token" , &self.brace_token); |
345 | formatter.field(name:"variants" , &self.variants); |
346 | formatter.finish() |
347 | } |
348 | } |
349 | #[cfg (feature = "derive" )] |
350 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
351 | impl Debug for crate::DataStruct { |
352 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
353 | self.debug(formatter, name:"DataStruct" ) |
354 | } |
355 | } |
356 | #[cfg (feature = "derive" )] |
357 | impl crate::DataStruct { |
358 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
359 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
360 | formatter.field(name:"struct_token" , &self.struct_token); |
361 | formatter.field(name:"fields" , &self.fields); |
362 | formatter.field(name:"semi_token" , &self.semi_token); |
363 | formatter.finish() |
364 | } |
365 | } |
366 | #[cfg (feature = "derive" )] |
367 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
368 | impl Debug for crate::DataUnion { |
369 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
370 | self.debug(formatter, name:"DataUnion" ) |
371 | } |
372 | } |
373 | #[cfg (feature = "derive" )] |
374 | impl crate::DataUnion { |
375 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
376 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
377 | formatter.field(name:"union_token" , &self.union_token); |
378 | formatter.field(name:"fields" , &self.fields); |
379 | formatter.finish() |
380 | } |
381 | } |
382 | #[cfg (feature = "derive" )] |
383 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
384 | impl Debug for crate::DeriveInput { |
385 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
386 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"DeriveInput" ); |
387 | formatter.field(name:"attrs" , &self.attrs); |
388 | formatter.field(name:"vis" , &self.vis); |
389 | formatter.field(name:"ident" , &self.ident); |
390 | formatter.field(name:"generics" , &self.generics); |
391 | formatter.field(name:"data" , &self.data); |
392 | formatter.finish() |
393 | } |
394 | } |
395 | #[cfg (any(feature = "derive" , feature = "full" ))] |
396 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
397 | impl Debug for crate::Expr { |
398 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
399 | formatter.write_str("Expr::" )?; |
400 | match self { |
401 | #[cfg (feature = "full" )] |
402 | crate::Expr::Array(v0) => v0.debug(formatter, "Array" ), |
403 | #[cfg (feature = "full" )] |
404 | crate::Expr::Assign(v0) => v0.debug(formatter, "Assign" ), |
405 | #[cfg (feature = "full" )] |
406 | crate::Expr::Async(v0) => v0.debug(formatter, "Async" ), |
407 | #[cfg (feature = "full" )] |
408 | crate::Expr::Await(v0) => v0.debug(formatter, "Await" ), |
409 | crate::Expr::Binary(v0) => v0.debug(formatter, "Binary" ), |
410 | #[cfg (feature = "full" )] |
411 | crate::Expr::Block(v0) => v0.debug(formatter, "Block" ), |
412 | #[cfg (feature = "full" )] |
413 | crate::Expr::Break(v0) => v0.debug(formatter, "Break" ), |
414 | crate::Expr::Call(v0) => v0.debug(formatter, "Call" ), |
415 | crate::Expr::Cast(v0) => v0.debug(formatter, "Cast" ), |
416 | #[cfg (feature = "full" )] |
417 | crate::Expr::Closure(v0) => v0.debug(formatter, "Closure" ), |
418 | #[cfg (feature = "full" )] |
419 | crate::Expr::Const(v0) => v0.debug(formatter, "Const" ), |
420 | #[cfg (feature = "full" )] |
421 | crate::Expr::Continue(v0) => v0.debug(formatter, "Continue" ), |
422 | crate::Expr::Field(v0) => v0.debug(formatter, "Field" ), |
423 | #[cfg (feature = "full" )] |
424 | crate::Expr::ForLoop(v0) => v0.debug(formatter, "ForLoop" ), |
425 | crate::Expr::Group(v0) => v0.debug(formatter, "Group" ), |
426 | #[cfg (feature = "full" )] |
427 | crate::Expr::If(v0) => v0.debug(formatter, "If" ), |
428 | crate::Expr::Index(v0) => v0.debug(formatter, "Index" ), |
429 | #[cfg (feature = "full" )] |
430 | crate::Expr::Infer(v0) => v0.debug(formatter, "Infer" ), |
431 | #[cfg (feature = "full" )] |
432 | crate::Expr::Let(v0) => v0.debug(formatter, "Let" ), |
433 | crate::Expr::Lit(v0) => v0.debug(formatter, "Lit" ), |
434 | #[cfg (feature = "full" )] |
435 | crate::Expr::Loop(v0) => v0.debug(formatter, "Loop" ), |
436 | crate::Expr::Macro(v0) => v0.debug(formatter, "Macro" ), |
437 | #[cfg (feature = "full" )] |
438 | crate::Expr::Match(v0) => v0.debug(formatter, "Match" ), |
439 | crate::Expr::MethodCall(v0) => v0.debug(formatter, "MethodCall" ), |
440 | crate::Expr::Paren(v0) => v0.debug(formatter, "Paren" ), |
441 | crate::Expr::Path(v0) => v0.debug(formatter, "Path" ), |
442 | #[cfg (feature = "full" )] |
443 | crate::Expr::Range(v0) => v0.debug(formatter, "Range" ), |
444 | crate::Expr::Reference(v0) => v0.debug(formatter, "Reference" ), |
445 | #[cfg (feature = "full" )] |
446 | crate::Expr::Repeat(v0) => v0.debug(formatter, "Repeat" ), |
447 | #[cfg (feature = "full" )] |
448 | crate::Expr::Return(v0) => v0.debug(formatter, "Return" ), |
449 | crate::Expr::Struct(v0) => v0.debug(formatter, "Struct" ), |
450 | #[cfg (feature = "full" )] |
451 | crate::Expr::Try(v0) => v0.debug(formatter, "Try" ), |
452 | #[cfg (feature = "full" )] |
453 | crate::Expr::TryBlock(v0) => v0.debug(formatter, "TryBlock" ), |
454 | #[cfg (feature = "full" )] |
455 | crate::Expr::Tuple(v0) => v0.debug(formatter, "Tuple" ), |
456 | crate::Expr::Unary(v0) => v0.debug(formatter, "Unary" ), |
457 | #[cfg (feature = "full" )] |
458 | crate::Expr::Unsafe(v0) => v0.debug(formatter, "Unsafe" ), |
459 | crate::Expr::Verbatim(v0) => { |
460 | let mut formatter = formatter.debug_tuple("Verbatim" ); |
461 | formatter.field(v0); |
462 | formatter.finish() |
463 | } |
464 | #[cfg (feature = "full" )] |
465 | crate::Expr::While(v0) => v0.debug(formatter, "While" ), |
466 | #[cfg (feature = "full" )] |
467 | crate::Expr::Yield(v0) => v0.debug(formatter, "Yield" ), |
468 | #[cfg (not(feature = "full" ))] |
469 | _ => unreachable!(), |
470 | } |
471 | } |
472 | } |
473 | #[cfg (feature = "full" )] |
474 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
475 | impl Debug for crate::ExprArray { |
476 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
477 | self.debug(formatter, name:"ExprArray" ) |
478 | } |
479 | } |
480 | #[cfg (feature = "full" )] |
481 | impl crate::ExprArray { |
482 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
483 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
484 | formatter.field(name:"attrs" , &self.attrs); |
485 | formatter.field(name:"bracket_token" , &self.bracket_token); |
486 | formatter.field(name:"elems" , &self.elems); |
487 | formatter.finish() |
488 | } |
489 | } |
490 | #[cfg (feature = "full" )] |
491 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
492 | impl Debug for crate::ExprAssign { |
493 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
494 | self.debug(formatter, name:"ExprAssign" ) |
495 | } |
496 | } |
497 | #[cfg (feature = "full" )] |
498 | impl crate::ExprAssign { |
499 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
500 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
501 | formatter.field(name:"attrs" , &self.attrs); |
502 | formatter.field(name:"left" , &self.left); |
503 | formatter.field(name:"eq_token" , &self.eq_token); |
504 | formatter.field(name:"right" , &self.right); |
505 | formatter.finish() |
506 | } |
507 | } |
508 | #[cfg (feature = "full" )] |
509 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
510 | impl Debug for crate::ExprAsync { |
511 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
512 | self.debug(formatter, name:"ExprAsync" ) |
513 | } |
514 | } |
515 | #[cfg (feature = "full" )] |
516 | impl crate::ExprAsync { |
517 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
518 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
519 | formatter.field(name:"attrs" , &self.attrs); |
520 | formatter.field(name:"async_token" , &self.async_token); |
521 | formatter.field(name:"capture" , &self.capture); |
522 | formatter.field(name:"block" , &self.block); |
523 | formatter.finish() |
524 | } |
525 | } |
526 | #[cfg (feature = "full" )] |
527 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
528 | impl Debug for crate::ExprAwait { |
529 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
530 | self.debug(formatter, name:"ExprAwait" ) |
531 | } |
532 | } |
533 | #[cfg (feature = "full" )] |
534 | impl crate::ExprAwait { |
535 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
536 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
537 | formatter.field(name:"attrs" , &self.attrs); |
538 | formatter.field(name:"base" , &self.base); |
539 | formatter.field(name:"dot_token" , &self.dot_token); |
540 | formatter.field(name:"await_token" , &self.await_token); |
541 | formatter.finish() |
542 | } |
543 | } |
544 | #[cfg (any(feature = "derive" , feature = "full" ))] |
545 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
546 | impl Debug for crate::ExprBinary { |
547 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
548 | self.debug(formatter, name:"ExprBinary" ) |
549 | } |
550 | } |
551 | #[cfg (any(feature = "derive" , feature = "full" ))] |
552 | impl crate::ExprBinary { |
553 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
554 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
555 | formatter.field(name:"attrs" , &self.attrs); |
556 | formatter.field(name:"left" , &self.left); |
557 | formatter.field(name:"op" , &self.op); |
558 | formatter.field(name:"right" , &self.right); |
559 | formatter.finish() |
560 | } |
561 | } |
562 | #[cfg (feature = "full" )] |
563 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
564 | impl Debug for crate::ExprBlock { |
565 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
566 | self.debug(formatter, name:"ExprBlock" ) |
567 | } |
568 | } |
569 | #[cfg (feature = "full" )] |
570 | impl crate::ExprBlock { |
571 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
572 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
573 | formatter.field(name:"attrs" , &self.attrs); |
574 | formatter.field(name:"label" , &self.label); |
575 | formatter.field(name:"block" , &self.block); |
576 | formatter.finish() |
577 | } |
578 | } |
579 | #[cfg (feature = "full" )] |
580 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
581 | impl Debug for crate::ExprBreak { |
582 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
583 | self.debug(formatter, name:"ExprBreak" ) |
584 | } |
585 | } |
586 | #[cfg (feature = "full" )] |
587 | impl crate::ExprBreak { |
588 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
589 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
590 | formatter.field(name:"attrs" , &self.attrs); |
591 | formatter.field(name:"break_token" , &self.break_token); |
592 | formatter.field(name:"label" , &self.label); |
593 | formatter.field(name:"expr" , &self.expr); |
594 | formatter.finish() |
595 | } |
596 | } |
597 | #[cfg (any(feature = "derive" , feature = "full" ))] |
598 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
599 | impl Debug for crate::ExprCall { |
600 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
601 | self.debug(formatter, name:"ExprCall" ) |
602 | } |
603 | } |
604 | #[cfg (any(feature = "derive" , feature = "full" ))] |
605 | impl crate::ExprCall { |
606 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
607 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
608 | formatter.field(name:"attrs" , &self.attrs); |
609 | formatter.field(name:"func" , &self.func); |
610 | formatter.field(name:"paren_token" , &self.paren_token); |
611 | formatter.field(name:"args" , &self.args); |
612 | formatter.finish() |
613 | } |
614 | } |
615 | #[cfg (any(feature = "derive" , feature = "full" ))] |
616 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
617 | impl Debug for crate::ExprCast { |
618 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
619 | self.debug(formatter, name:"ExprCast" ) |
620 | } |
621 | } |
622 | #[cfg (any(feature = "derive" , feature = "full" ))] |
623 | impl crate::ExprCast { |
624 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
625 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
626 | formatter.field(name:"attrs" , &self.attrs); |
627 | formatter.field(name:"expr" , &self.expr); |
628 | formatter.field(name:"as_token" , &self.as_token); |
629 | formatter.field(name:"ty" , &self.ty); |
630 | formatter.finish() |
631 | } |
632 | } |
633 | #[cfg (feature = "full" )] |
634 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
635 | impl Debug for crate::ExprClosure { |
636 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
637 | self.debug(formatter, name:"ExprClosure" ) |
638 | } |
639 | } |
640 | #[cfg (feature = "full" )] |
641 | impl crate::ExprClosure { |
642 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
643 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
644 | formatter.field(name:"attrs" , &self.attrs); |
645 | formatter.field(name:"lifetimes" , &self.lifetimes); |
646 | formatter.field(name:"constness" , &self.constness); |
647 | formatter.field(name:"movability" , &self.movability); |
648 | formatter.field(name:"asyncness" , &self.asyncness); |
649 | formatter.field(name:"capture" , &self.capture); |
650 | formatter.field(name:"or1_token" , &self.or1_token); |
651 | formatter.field(name:"inputs" , &self.inputs); |
652 | formatter.field(name:"or2_token" , &self.or2_token); |
653 | formatter.field(name:"output" , &self.output); |
654 | formatter.field(name:"body" , &self.body); |
655 | formatter.finish() |
656 | } |
657 | } |
658 | #[cfg (feature = "full" )] |
659 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
660 | impl Debug for crate::ExprConst { |
661 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
662 | self.debug(formatter, name:"ExprConst" ) |
663 | } |
664 | } |
665 | #[cfg (feature = "full" )] |
666 | impl crate::ExprConst { |
667 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
668 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
669 | formatter.field(name:"attrs" , &self.attrs); |
670 | formatter.field(name:"const_token" , &self.const_token); |
671 | formatter.field(name:"block" , &self.block); |
672 | formatter.finish() |
673 | } |
674 | } |
675 | #[cfg (feature = "full" )] |
676 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
677 | impl Debug for crate::ExprContinue { |
678 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
679 | self.debug(formatter, name:"ExprContinue" ) |
680 | } |
681 | } |
682 | #[cfg (feature = "full" )] |
683 | impl crate::ExprContinue { |
684 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
685 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
686 | formatter.field(name:"attrs" , &self.attrs); |
687 | formatter.field(name:"continue_token" , &self.continue_token); |
688 | formatter.field(name:"label" , &self.label); |
689 | formatter.finish() |
690 | } |
691 | } |
692 | #[cfg (any(feature = "derive" , feature = "full" ))] |
693 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
694 | impl Debug for crate::ExprField { |
695 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
696 | self.debug(formatter, name:"ExprField" ) |
697 | } |
698 | } |
699 | #[cfg (any(feature = "derive" , feature = "full" ))] |
700 | impl crate::ExprField { |
701 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
702 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
703 | formatter.field(name:"attrs" , &self.attrs); |
704 | formatter.field(name:"base" , &self.base); |
705 | formatter.field(name:"dot_token" , &self.dot_token); |
706 | formatter.field(name:"member" , &self.member); |
707 | formatter.finish() |
708 | } |
709 | } |
710 | #[cfg (feature = "full" )] |
711 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
712 | impl Debug for crate::ExprForLoop { |
713 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
714 | self.debug(formatter, name:"ExprForLoop" ) |
715 | } |
716 | } |
717 | #[cfg (feature = "full" )] |
718 | impl crate::ExprForLoop { |
719 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
720 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
721 | formatter.field(name:"attrs" , &self.attrs); |
722 | formatter.field(name:"label" , &self.label); |
723 | formatter.field(name:"for_token" , &self.for_token); |
724 | formatter.field(name:"pat" , &self.pat); |
725 | formatter.field(name:"in_token" , &self.in_token); |
726 | formatter.field(name:"expr" , &self.expr); |
727 | formatter.field(name:"body" , &self.body); |
728 | formatter.finish() |
729 | } |
730 | } |
731 | #[cfg (any(feature = "derive" , feature = "full" ))] |
732 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
733 | impl Debug for crate::ExprGroup { |
734 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
735 | self.debug(formatter, name:"ExprGroup" ) |
736 | } |
737 | } |
738 | #[cfg (any(feature = "derive" , feature = "full" ))] |
739 | impl crate::ExprGroup { |
740 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
741 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
742 | formatter.field(name:"attrs" , &self.attrs); |
743 | formatter.field(name:"group_token" , &self.group_token); |
744 | formatter.field(name:"expr" , &self.expr); |
745 | formatter.finish() |
746 | } |
747 | } |
748 | #[cfg (feature = "full" )] |
749 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
750 | impl Debug for crate::ExprIf { |
751 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
752 | self.debug(formatter, name:"ExprIf" ) |
753 | } |
754 | } |
755 | #[cfg (feature = "full" )] |
756 | impl crate::ExprIf { |
757 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
758 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
759 | formatter.field(name:"attrs" , &self.attrs); |
760 | formatter.field(name:"if_token" , &self.if_token); |
761 | formatter.field(name:"cond" , &self.cond); |
762 | formatter.field(name:"then_branch" , &self.then_branch); |
763 | formatter.field(name:"else_branch" , &self.else_branch); |
764 | formatter.finish() |
765 | } |
766 | } |
767 | #[cfg (any(feature = "derive" , feature = "full" ))] |
768 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
769 | impl Debug for crate::ExprIndex { |
770 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
771 | self.debug(formatter, name:"ExprIndex" ) |
772 | } |
773 | } |
774 | #[cfg (any(feature = "derive" , feature = "full" ))] |
775 | impl crate::ExprIndex { |
776 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
777 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
778 | formatter.field(name:"attrs" , &self.attrs); |
779 | formatter.field(name:"expr" , &self.expr); |
780 | formatter.field(name:"bracket_token" , &self.bracket_token); |
781 | formatter.field(name:"index" , &self.index); |
782 | formatter.finish() |
783 | } |
784 | } |
785 | #[cfg (feature = "full" )] |
786 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
787 | impl Debug for crate::ExprInfer { |
788 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
789 | self.debug(formatter, name:"ExprInfer" ) |
790 | } |
791 | } |
792 | #[cfg (feature = "full" )] |
793 | impl crate::ExprInfer { |
794 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
795 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
796 | formatter.field(name:"attrs" , &self.attrs); |
797 | formatter.field(name:"underscore_token" , &self.underscore_token); |
798 | formatter.finish() |
799 | } |
800 | } |
801 | #[cfg (feature = "full" )] |
802 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
803 | impl Debug for crate::ExprLet { |
804 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
805 | self.debug(formatter, name:"ExprLet" ) |
806 | } |
807 | } |
808 | #[cfg (feature = "full" )] |
809 | impl crate::ExprLet { |
810 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
811 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
812 | formatter.field(name:"attrs" , &self.attrs); |
813 | formatter.field(name:"let_token" , &self.let_token); |
814 | formatter.field(name:"pat" , &self.pat); |
815 | formatter.field(name:"eq_token" , &self.eq_token); |
816 | formatter.field(name:"expr" , &self.expr); |
817 | formatter.finish() |
818 | } |
819 | } |
820 | #[cfg (any(feature = "derive" , feature = "full" ))] |
821 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
822 | impl Debug for crate::ExprLit { |
823 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
824 | self.debug(formatter, name:"ExprLit" ) |
825 | } |
826 | } |
827 | #[cfg (any(feature = "derive" , feature = "full" ))] |
828 | impl crate::ExprLit { |
829 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
830 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
831 | formatter.field(name:"attrs" , &self.attrs); |
832 | formatter.field(name:"lit" , &self.lit); |
833 | formatter.finish() |
834 | } |
835 | } |
836 | #[cfg (feature = "full" )] |
837 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
838 | impl Debug for crate::ExprLoop { |
839 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
840 | self.debug(formatter, name:"ExprLoop" ) |
841 | } |
842 | } |
843 | #[cfg (feature = "full" )] |
844 | impl crate::ExprLoop { |
845 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
846 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
847 | formatter.field(name:"attrs" , &self.attrs); |
848 | formatter.field(name:"label" , &self.label); |
849 | formatter.field(name:"loop_token" , &self.loop_token); |
850 | formatter.field(name:"body" , &self.body); |
851 | formatter.finish() |
852 | } |
853 | } |
854 | #[cfg (any(feature = "derive" , feature = "full" ))] |
855 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
856 | impl Debug for crate::ExprMacro { |
857 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
858 | self.debug(formatter, name:"ExprMacro" ) |
859 | } |
860 | } |
861 | #[cfg (any(feature = "derive" , feature = "full" ))] |
862 | impl crate::ExprMacro { |
863 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
864 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
865 | formatter.field(name:"attrs" , &self.attrs); |
866 | formatter.field(name:"mac" , &self.mac); |
867 | formatter.finish() |
868 | } |
869 | } |
870 | #[cfg (feature = "full" )] |
871 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
872 | impl Debug for crate::ExprMatch { |
873 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
874 | self.debug(formatter, name:"ExprMatch" ) |
875 | } |
876 | } |
877 | #[cfg (feature = "full" )] |
878 | impl crate::ExprMatch { |
879 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
880 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
881 | formatter.field(name:"attrs" , &self.attrs); |
882 | formatter.field(name:"match_token" , &self.match_token); |
883 | formatter.field(name:"expr" , &self.expr); |
884 | formatter.field(name:"brace_token" , &self.brace_token); |
885 | formatter.field(name:"arms" , &self.arms); |
886 | formatter.finish() |
887 | } |
888 | } |
889 | #[cfg (any(feature = "derive" , feature = "full" ))] |
890 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
891 | impl Debug for crate::ExprMethodCall { |
892 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
893 | self.debug(formatter, name:"ExprMethodCall" ) |
894 | } |
895 | } |
896 | #[cfg (any(feature = "derive" , feature = "full" ))] |
897 | impl crate::ExprMethodCall { |
898 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
899 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
900 | formatter.field(name:"attrs" , &self.attrs); |
901 | formatter.field(name:"receiver" , &self.receiver); |
902 | formatter.field(name:"dot_token" , &self.dot_token); |
903 | formatter.field(name:"method" , &self.method); |
904 | formatter.field(name:"turbofish" , &self.turbofish); |
905 | formatter.field(name:"paren_token" , &self.paren_token); |
906 | formatter.field(name:"args" , &self.args); |
907 | formatter.finish() |
908 | } |
909 | } |
910 | #[cfg (any(feature = "derive" , feature = "full" ))] |
911 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
912 | impl Debug for crate::ExprParen { |
913 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
914 | self.debug(formatter, name:"ExprParen" ) |
915 | } |
916 | } |
917 | #[cfg (any(feature = "derive" , feature = "full" ))] |
918 | impl crate::ExprParen { |
919 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
920 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
921 | formatter.field(name:"attrs" , &self.attrs); |
922 | formatter.field(name:"paren_token" , &self.paren_token); |
923 | formatter.field(name:"expr" , &self.expr); |
924 | formatter.finish() |
925 | } |
926 | } |
927 | #[cfg (any(feature = "derive" , feature = "full" ))] |
928 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
929 | impl Debug for crate::ExprPath { |
930 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
931 | self.debug(formatter, name:"ExprPath" ) |
932 | } |
933 | } |
934 | #[cfg (any(feature = "derive" , feature = "full" ))] |
935 | impl crate::ExprPath { |
936 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
937 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
938 | formatter.field(name:"attrs" , &self.attrs); |
939 | formatter.field(name:"qself" , &self.qself); |
940 | formatter.field(name:"path" , &self.path); |
941 | formatter.finish() |
942 | } |
943 | } |
944 | #[cfg (feature = "full" )] |
945 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
946 | impl Debug for crate::ExprRange { |
947 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
948 | self.debug(formatter, name:"ExprRange" ) |
949 | } |
950 | } |
951 | #[cfg (feature = "full" )] |
952 | impl crate::ExprRange { |
953 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
954 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
955 | formatter.field(name:"attrs" , &self.attrs); |
956 | formatter.field(name:"start" , &self.start); |
957 | formatter.field(name:"limits" , &self.limits); |
958 | formatter.field(name:"end" , &self.end); |
959 | formatter.finish() |
960 | } |
961 | } |
962 | #[cfg (any(feature = "derive" , feature = "full" ))] |
963 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
964 | impl Debug for crate::ExprReference { |
965 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
966 | self.debug(formatter, name:"ExprReference" ) |
967 | } |
968 | } |
969 | #[cfg (any(feature = "derive" , feature = "full" ))] |
970 | impl crate::ExprReference { |
971 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
972 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
973 | formatter.field(name:"attrs" , &self.attrs); |
974 | formatter.field(name:"and_token" , &self.and_token); |
975 | formatter.field(name:"mutability" , &self.mutability); |
976 | formatter.field(name:"expr" , &self.expr); |
977 | formatter.finish() |
978 | } |
979 | } |
980 | #[cfg (feature = "full" )] |
981 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
982 | impl Debug for crate::ExprRepeat { |
983 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
984 | self.debug(formatter, name:"ExprRepeat" ) |
985 | } |
986 | } |
987 | #[cfg (feature = "full" )] |
988 | impl crate::ExprRepeat { |
989 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
990 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
991 | formatter.field(name:"attrs" , &self.attrs); |
992 | formatter.field(name:"bracket_token" , &self.bracket_token); |
993 | formatter.field(name:"expr" , &self.expr); |
994 | formatter.field(name:"semi_token" , &self.semi_token); |
995 | formatter.field(name:"len" , &self.len); |
996 | formatter.finish() |
997 | } |
998 | } |
999 | #[cfg (feature = "full" )] |
1000 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1001 | impl Debug for crate::ExprReturn { |
1002 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1003 | self.debug(formatter, name:"ExprReturn" ) |
1004 | } |
1005 | } |
1006 | #[cfg (feature = "full" )] |
1007 | impl crate::ExprReturn { |
1008 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1009 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1010 | formatter.field(name:"attrs" , &self.attrs); |
1011 | formatter.field(name:"return_token" , &self.return_token); |
1012 | formatter.field(name:"expr" , &self.expr); |
1013 | formatter.finish() |
1014 | } |
1015 | } |
1016 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1017 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1018 | impl Debug for crate::ExprStruct { |
1019 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1020 | self.debug(formatter, name:"ExprStruct" ) |
1021 | } |
1022 | } |
1023 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1024 | impl crate::ExprStruct { |
1025 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1026 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1027 | formatter.field(name:"attrs" , &self.attrs); |
1028 | formatter.field(name:"qself" , &self.qself); |
1029 | formatter.field(name:"path" , &self.path); |
1030 | formatter.field(name:"brace_token" , &self.brace_token); |
1031 | formatter.field(name:"fields" , &self.fields); |
1032 | formatter.field(name:"dot2_token" , &self.dot2_token); |
1033 | formatter.field(name:"rest" , &self.rest); |
1034 | formatter.finish() |
1035 | } |
1036 | } |
1037 | #[cfg (feature = "full" )] |
1038 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1039 | impl Debug for crate::ExprTry { |
1040 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1041 | self.debug(formatter, name:"ExprTry" ) |
1042 | } |
1043 | } |
1044 | #[cfg (feature = "full" )] |
1045 | impl crate::ExprTry { |
1046 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1047 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1048 | formatter.field(name:"attrs" , &self.attrs); |
1049 | formatter.field(name:"expr" , &self.expr); |
1050 | formatter.field(name:"question_token" , &self.question_token); |
1051 | formatter.finish() |
1052 | } |
1053 | } |
1054 | #[cfg (feature = "full" )] |
1055 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1056 | impl Debug for crate::ExprTryBlock { |
1057 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1058 | self.debug(formatter, name:"ExprTryBlock" ) |
1059 | } |
1060 | } |
1061 | #[cfg (feature = "full" )] |
1062 | impl crate::ExprTryBlock { |
1063 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1064 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1065 | formatter.field(name:"attrs" , &self.attrs); |
1066 | formatter.field(name:"try_token" , &self.try_token); |
1067 | formatter.field(name:"block" , &self.block); |
1068 | formatter.finish() |
1069 | } |
1070 | } |
1071 | #[cfg (feature = "full" )] |
1072 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1073 | impl Debug for crate::ExprTuple { |
1074 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1075 | self.debug(formatter, name:"ExprTuple" ) |
1076 | } |
1077 | } |
1078 | #[cfg (feature = "full" )] |
1079 | impl crate::ExprTuple { |
1080 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1081 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1082 | formatter.field(name:"attrs" , &self.attrs); |
1083 | formatter.field(name:"paren_token" , &self.paren_token); |
1084 | formatter.field(name:"elems" , &self.elems); |
1085 | formatter.finish() |
1086 | } |
1087 | } |
1088 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1089 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1090 | impl Debug for crate::ExprUnary { |
1091 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1092 | self.debug(formatter, name:"ExprUnary" ) |
1093 | } |
1094 | } |
1095 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1096 | impl crate::ExprUnary { |
1097 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1098 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1099 | formatter.field(name:"attrs" , &self.attrs); |
1100 | formatter.field(name:"op" , &self.op); |
1101 | formatter.field(name:"expr" , &self.expr); |
1102 | formatter.finish() |
1103 | } |
1104 | } |
1105 | #[cfg (feature = "full" )] |
1106 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1107 | impl Debug for crate::ExprUnsafe { |
1108 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1109 | self.debug(formatter, name:"ExprUnsafe" ) |
1110 | } |
1111 | } |
1112 | #[cfg (feature = "full" )] |
1113 | impl crate::ExprUnsafe { |
1114 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1115 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1116 | formatter.field(name:"attrs" , &self.attrs); |
1117 | formatter.field(name:"unsafe_token" , &self.unsafe_token); |
1118 | formatter.field(name:"block" , &self.block); |
1119 | formatter.finish() |
1120 | } |
1121 | } |
1122 | #[cfg (feature = "full" )] |
1123 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1124 | impl Debug for crate::ExprWhile { |
1125 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1126 | self.debug(formatter, name:"ExprWhile" ) |
1127 | } |
1128 | } |
1129 | #[cfg (feature = "full" )] |
1130 | impl crate::ExprWhile { |
1131 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1132 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1133 | formatter.field(name:"attrs" , &self.attrs); |
1134 | formatter.field(name:"label" , &self.label); |
1135 | formatter.field(name:"while_token" , &self.while_token); |
1136 | formatter.field(name:"cond" , &self.cond); |
1137 | formatter.field(name:"body" , &self.body); |
1138 | formatter.finish() |
1139 | } |
1140 | } |
1141 | #[cfg (feature = "full" )] |
1142 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1143 | impl Debug for crate::ExprYield { |
1144 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1145 | self.debug(formatter, name:"ExprYield" ) |
1146 | } |
1147 | } |
1148 | #[cfg (feature = "full" )] |
1149 | impl crate::ExprYield { |
1150 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1151 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1152 | formatter.field(name:"attrs" , &self.attrs); |
1153 | formatter.field(name:"yield_token" , &self.yield_token); |
1154 | formatter.field(name:"expr" , &self.expr); |
1155 | formatter.finish() |
1156 | } |
1157 | } |
1158 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1159 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1160 | impl Debug for crate::Field { |
1161 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1162 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Field" ); |
1163 | formatter.field(name:"attrs" , &self.attrs); |
1164 | formatter.field(name:"vis" , &self.vis); |
1165 | formatter.field(name:"mutability" , &self.mutability); |
1166 | formatter.field(name:"ident" , &self.ident); |
1167 | formatter.field(name:"colon_token" , &self.colon_token); |
1168 | formatter.field(name:"ty" , &self.ty); |
1169 | formatter.finish() |
1170 | } |
1171 | } |
1172 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1173 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1174 | impl Debug for crate::FieldMutability { |
1175 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1176 | formatter.write_str(data:"FieldMutability::" )?; |
1177 | match self { |
1178 | crate::FieldMutability::None => formatter.write_str(data:"None" ), |
1179 | } |
1180 | } |
1181 | } |
1182 | #[cfg (feature = "full" )] |
1183 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1184 | impl Debug for crate::FieldPat { |
1185 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1186 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"FieldPat" ); |
1187 | formatter.field(name:"attrs" , &self.attrs); |
1188 | formatter.field(name:"member" , &self.member); |
1189 | formatter.field(name:"colon_token" , &self.colon_token); |
1190 | formatter.field(name:"pat" , &self.pat); |
1191 | formatter.finish() |
1192 | } |
1193 | } |
1194 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1195 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1196 | impl Debug for crate::FieldValue { |
1197 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1198 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"FieldValue" ); |
1199 | formatter.field(name:"attrs" , &self.attrs); |
1200 | formatter.field(name:"member" , &self.member); |
1201 | formatter.field(name:"colon_token" , &self.colon_token); |
1202 | formatter.field(name:"expr" , &self.expr); |
1203 | formatter.finish() |
1204 | } |
1205 | } |
1206 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1207 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1208 | impl Debug for crate::Fields { |
1209 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1210 | formatter.write_str(data:"Fields::" )?; |
1211 | match self { |
1212 | crate::Fields::Named(v0: &FieldsNamed) => v0.debug(formatter, name:"Named" ), |
1213 | crate::Fields::Unnamed(v0: &FieldsUnnamed) => v0.debug(formatter, name:"Unnamed" ), |
1214 | crate::Fields::Unit => formatter.write_str(data:"Unit" ), |
1215 | } |
1216 | } |
1217 | } |
1218 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1219 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1220 | impl Debug for crate::FieldsNamed { |
1221 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1222 | self.debug(formatter, name:"FieldsNamed" ) |
1223 | } |
1224 | } |
1225 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1226 | impl crate::FieldsNamed { |
1227 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1228 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1229 | formatter.field(name:"brace_token" , &self.brace_token); |
1230 | formatter.field(name:"named" , &self.named); |
1231 | formatter.finish() |
1232 | } |
1233 | } |
1234 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1235 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1236 | impl Debug for crate::FieldsUnnamed { |
1237 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1238 | self.debug(formatter, name:"FieldsUnnamed" ) |
1239 | } |
1240 | } |
1241 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1242 | impl crate::FieldsUnnamed { |
1243 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1244 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1245 | formatter.field(name:"paren_token" , &self.paren_token); |
1246 | formatter.field(name:"unnamed" , &self.unnamed); |
1247 | formatter.finish() |
1248 | } |
1249 | } |
1250 | #[cfg (feature = "full" )] |
1251 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1252 | impl Debug for crate::File { |
1253 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1254 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"File" ); |
1255 | formatter.field(name:"shebang" , &self.shebang); |
1256 | formatter.field(name:"attrs" , &self.attrs); |
1257 | formatter.field(name:"items" , &self.items); |
1258 | formatter.finish() |
1259 | } |
1260 | } |
1261 | #[cfg (feature = "full" )] |
1262 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1263 | impl Debug for crate::FnArg { |
1264 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1265 | formatter.write_str(data:"FnArg::" )?; |
1266 | match self { |
1267 | crate::FnArg::Receiver(v0: &Receiver) => { |
1268 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Receiver" ); |
1269 | formatter.field(v0); |
1270 | formatter.finish() |
1271 | } |
1272 | crate::FnArg::Typed(v0: &PatType) => { |
1273 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Typed" ); |
1274 | formatter.field(v0); |
1275 | formatter.finish() |
1276 | } |
1277 | } |
1278 | } |
1279 | } |
1280 | #[cfg (feature = "full" )] |
1281 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1282 | impl Debug for crate::ForeignItem { |
1283 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1284 | formatter.write_str(data:"ForeignItem::" )?; |
1285 | match self { |
1286 | crate::ForeignItem::Fn(v0: &ForeignItemFn) => v0.debug(formatter, name:"Fn" ), |
1287 | crate::ForeignItem::Static(v0: &ForeignItemStatic) => v0.debug(formatter, name:"Static" ), |
1288 | crate::ForeignItem::Type(v0: &ForeignItemType) => v0.debug(formatter, name:"Type" ), |
1289 | crate::ForeignItem::Macro(v0: &ForeignItemMacro) => v0.debug(formatter, name:"Macro" ), |
1290 | crate::ForeignItem::Verbatim(v0: &TokenStream) => { |
1291 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Verbatim" ); |
1292 | formatter.field(v0); |
1293 | formatter.finish() |
1294 | } |
1295 | } |
1296 | } |
1297 | } |
1298 | #[cfg (feature = "full" )] |
1299 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1300 | impl Debug for crate::ForeignItemFn { |
1301 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1302 | self.debug(formatter, name:"ForeignItemFn" ) |
1303 | } |
1304 | } |
1305 | #[cfg (feature = "full" )] |
1306 | impl crate::ForeignItemFn { |
1307 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1308 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1309 | formatter.field(name:"attrs" , &self.attrs); |
1310 | formatter.field(name:"vis" , &self.vis); |
1311 | formatter.field(name:"sig" , &self.sig); |
1312 | formatter.field(name:"semi_token" , &self.semi_token); |
1313 | formatter.finish() |
1314 | } |
1315 | } |
1316 | #[cfg (feature = "full" )] |
1317 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1318 | impl Debug for crate::ForeignItemMacro { |
1319 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1320 | self.debug(formatter, name:"ForeignItemMacro" ) |
1321 | } |
1322 | } |
1323 | #[cfg (feature = "full" )] |
1324 | impl crate::ForeignItemMacro { |
1325 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1326 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1327 | formatter.field(name:"attrs" , &self.attrs); |
1328 | formatter.field(name:"mac" , &self.mac); |
1329 | formatter.field(name:"semi_token" , &self.semi_token); |
1330 | formatter.finish() |
1331 | } |
1332 | } |
1333 | #[cfg (feature = "full" )] |
1334 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1335 | impl Debug for crate::ForeignItemStatic { |
1336 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1337 | self.debug(formatter, name:"ForeignItemStatic" ) |
1338 | } |
1339 | } |
1340 | #[cfg (feature = "full" )] |
1341 | impl crate::ForeignItemStatic { |
1342 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1343 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1344 | formatter.field(name:"attrs" , &self.attrs); |
1345 | formatter.field(name:"vis" , &self.vis); |
1346 | formatter.field(name:"static_token" , &self.static_token); |
1347 | formatter.field(name:"mutability" , &self.mutability); |
1348 | formatter.field(name:"ident" , &self.ident); |
1349 | formatter.field(name:"colon_token" , &self.colon_token); |
1350 | formatter.field(name:"ty" , &self.ty); |
1351 | formatter.field(name:"semi_token" , &self.semi_token); |
1352 | formatter.finish() |
1353 | } |
1354 | } |
1355 | #[cfg (feature = "full" )] |
1356 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1357 | impl Debug for crate::ForeignItemType { |
1358 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1359 | self.debug(formatter, name:"ForeignItemType" ) |
1360 | } |
1361 | } |
1362 | #[cfg (feature = "full" )] |
1363 | impl crate::ForeignItemType { |
1364 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1365 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1366 | formatter.field(name:"attrs" , &self.attrs); |
1367 | formatter.field(name:"vis" , &self.vis); |
1368 | formatter.field(name:"type_token" , &self.type_token); |
1369 | formatter.field(name:"ident" , &self.ident); |
1370 | formatter.field(name:"generics" , &self.generics); |
1371 | formatter.field(name:"semi_token" , &self.semi_token); |
1372 | formatter.finish() |
1373 | } |
1374 | } |
1375 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1376 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1377 | impl Debug for crate::GenericArgument { |
1378 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1379 | formatter.write_str("GenericArgument::" )?; |
1380 | match self { |
1381 | crate::GenericArgument::Lifetime(v0) => { |
1382 | let mut formatter = formatter.debug_tuple("Lifetime" ); |
1383 | formatter.field(v0); |
1384 | formatter.finish() |
1385 | } |
1386 | crate::GenericArgument::Type(v0) => { |
1387 | let mut formatter = formatter.debug_tuple("Type" ); |
1388 | formatter.field(v0); |
1389 | formatter.finish() |
1390 | } |
1391 | crate::GenericArgument::Const(v0) => { |
1392 | let mut formatter = formatter.debug_tuple("Const" ); |
1393 | formatter.field(v0); |
1394 | formatter.finish() |
1395 | } |
1396 | crate::GenericArgument::AssocType(v0) => { |
1397 | let mut formatter = formatter.debug_tuple("AssocType" ); |
1398 | formatter.field(v0); |
1399 | formatter.finish() |
1400 | } |
1401 | crate::GenericArgument::AssocConst(v0) => { |
1402 | let mut formatter = formatter.debug_tuple("AssocConst" ); |
1403 | formatter.field(v0); |
1404 | formatter.finish() |
1405 | } |
1406 | crate::GenericArgument::Constraint(v0) => { |
1407 | let mut formatter = formatter.debug_tuple("Constraint" ); |
1408 | formatter.field(v0); |
1409 | formatter.finish() |
1410 | } |
1411 | } |
1412 | } |
1413 | } |
1414 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1415 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1416 | impl Debug for crate::GenericParam { |
1417 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1418 | formatter.write_str(data:"GenericParam::" )?; |
1419 | match self { |
1420 | crate::GenericParam::Lifetime(v0: &LifetimeParam) => { |
1421 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Lifetime" ); |
1422 | formatter.field(v0); |
1423 | formatter.finish() |
1424 | } |
1425 | crate::GenericParam::Type(v0: &TypeParam) => { |
1426 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Type" ); |
1427 | formatter.field(v0); |
1428 | formatter.finish() |
1429 | } |
1430 | crate::GenericParam::Const(v0: &ConstParam) => { |
1431 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Const" ); |
1432 | formatter.field(v0); |
1433 | formatter.finish() |
1434 | } |
1435 | } |
1436 | } |
1437 | } |
1438 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1439 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1440 | impl Debug for crate::Generics { |
1441 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1442 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Generics" ); |
1443 | formatter.field(name:"lt_token" , &self.lt_token); |
1444 | formatter.field(name:"params" , &self.params); |
1445 | formatter.field(name:"gt_token" , &self.gt_token); |
1446 | formatter.field(name:"where_clause" , &self.where_clause); |
1447 | formatter.finish() |
1448 | } |
1449 | } |
1450 | #[cfg (feature = "full" )] |
1451 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1452 | impl Debug for crate::ImplItem { |
1453 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1454 | formatter.write_str(data:"ImplItem::" )?; |
1455 | match self { |
1456 | crate::ImplItem::Const(v0: &ImplItemConst) => v0.debug(formatter, name:"Const" ), |
1457 | crate::ImplItem::Fn(v0: &ImplItemFn) => v0.debug(formatter, name:"Fn" ), |
1458 | crate::ImplItem::Type(v0: &ImplItemType) => v0.debug(formatter, name:"Type" ), |
1459 | crate::ImplItem::Macro(v0: &ImplItemMacro) => v0.debug(formatter, name:"Macro" ), |
1460 | crate::ImplItem::Verbatim(v0: &TokenStream) => { |
1461 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Verbatim" ); |
1462 | formatter.field(v0); |
1463 | formatter.finish() |
1464 | } |
1465 | } |
1466 | } |
1467 | } |
1468 | #[cfg (feature = "full" )] |
1469 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1470 | impl Debug for crate::ImplItemConst { |
1471 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1472 | self.debug(formatter, name:"ImplItemConst" ) |
1473 | } |
1474 | } |
1475 | #[cfg (feature = "full" )] |
1476 | impl crate::ImplItemConst { |
1477 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1478 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1479 | formatter.field(name:"attrs" , &self.attrs); |
1480 | formatter.field(name:"vis" , &self.vis); |
1481 | formatter.field(name:"defaultness" , &self.defaultness); |
1482 | formatter.field(name:"const_token" , &self.const_token); |
1483 | formatter.field(name:"ident" , &self.ident); |
1484 | formatter.field(name:"generics" , &self.generics); |
1485 | formatter.field(name:"colon_token" , &self.colon_token); |
1486 | formatter.field(name:"ty" , &self.ty); |
1487 | formatter.field(name:"eq_token" , &self.eq_token); |
1488 | formatter.field(name:"expr" , &self.expr); |
1489 | formatter.field(name:"semi_token" , &self.semi_token); |
1490 | formatter.finish() |
1491 | } |
1492 | } |
1493 | #[cfg (feature = "full" )] |
1494 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1495 | impl Debug for crate::ImplItemFn { |
1496 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1497 | self.debug(formatter, name:"ImplItemFn" ) |
1498 | } |
1499 | } |
1500 | #[cfg (feature = "full" )] |
1501 | impl crate::ImplItemFn { |
1502 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1503 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1504 | formatter.field(name:"attrs" , &self.attrs); |
1505 | formatter.field(name:"vis" , &self.vis); |
1506 | formatter.field(name:"defaultness" , &self.defaultness); |
1507 | formatter.field(name:"sig" , &self.sig); |
1508 | formatter.field(name:"block" , &self.block); |
1509 | formatter.finish() |
1510 | } |
1511 | } |
1512 | #[cfg (feature = "full" )] |
1513 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1514 | impl Debug for crate::ImplItemMacro { |
1515 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1516 | self.debug(formatter, name:"ImplItemMacro" ) |
1517 | } |
1518 | } |
1519 | #[cfg (feature = "full" )] |
1520 | impl crate::ImplItemMacro { |
1521 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1522 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1523 | formatter.field(name:"attrs" , &self.attrs); |
1524 | formatter.field(name:"mac" , &self.mac); |
1525 | formatter.field(name:"semi_token" , &self.semi_token); |
1526 | formatter.finish() |
1527 | } |
1528 | } |
1529 | #[cfg (feature = "full" )] |
1530 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1531 | impl Debug for crate::ImplItemType { |
1532 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1533 | self.debug(formatter, name:"ImplItemType" ) |
1534 | } |
1535 | } |
1536 | #[cfg (feature = "full" )] |
1537 | impl crate::ImplItemType { |
1538 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1539 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1540 | formatter.field(name:"attrs" , &self.attrs); |
1541 | formatter.field(name:"vis" , &self.vis); |
1542 | formatter.field(name:"defaultness" , &self.defaultness); |
1543 | formatter.field(name:"type_token" , &self.type_token); |
1544 | formatter.field(name:"ident" , &self.ident); |
1545 | formatter.field(name:"generics" , &self.generics); |
1546 | formatter.field(name:"eq_token" , &self.eq_token); |
1547 | formatter.field(name:"ty" , &self.ty); |
1548 | formatter.field(name:"semi_token" , &self.semi_token); |
1549 | formatter.finish() |
1550 | } |
1551 | } |
1552 | #[cfg (feature = "full" )] |
1553 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1554 | impl Debug for crate::ImplRestriction { |
1555 | fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result { |
1556 | match *self {} |
1557 | } |
1558 | } |
1559 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1560 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1561 | impl Debug for crate::Index { |
1562 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1563 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Index" ); |
1564 | formatter.field(name:"index" , &self.index); |
1565 | formatter.field(name:"span" , &self.span); |
1566 | formatter.finish() |
1567 | } |
1568 | } |
1569 | #[cfg (feature = "full" )] |
1570 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1571 | impl Debug for crate::Item { |
1572 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1573 | formatter.write_str("Item::" )?; |
1574 | match self { |
1575 | crate::Item::Const(v0) => v0.debug(formatter, "Const" ), |
1576 | crate::Item::Enum(v0) => v0.debug(formatter, "Enum" ), |
1577 | crate::Item::ExternCrate(v0) => v0.debug(formatter, "ExternCrate" ), |
1578 | crate::Item::Fn(v0) => v0.debug(formatter, "Fn" ), |
1579 | crate::Item::ForeignMod(v0) => v0.debug(formatter, "ForeignMod" ), |
1580 | crate::Item::Impl(v0) => v0.debug(formatter, "Impl" ), |
1581 | crate::Item::Macro(v0) => v0.debug(formatter, "Macro" ), |
1582 | crate::Item::Mod(v0) => v0.debug(formatter, "Mod" ), |
1583 | crate::Item::Static(v0) => v0.debug(formatter, "Static" ), |
1584 | crate::Item::Struct(v0) => v0.debug(formatter, "Struct" ), |
1585 | crate::Item::Trait(v0) => v0.debug(formatter, "Trait" ), |
1586 | crate::Item::TraitAlias(v0) => v0.debug(formatter, "TraitAlias" ), |
1587 | crate::Item::Type(v0) => v0.debug(formatter, "Type" ), |
1588 | crate::Item::Union(v0) => v0.debug(formatter, "Union" ), |
1589 | crate::Item::Use(v0) => v0.debug(formatter, "Use" ), |
1590 | crate::Item::Verbatim(v0) => { |
1591 | let mut formatter = formatter.debug_tuple("Verbatim" ); |
1592 | formatter.field(v0); |
1593 | formatter.finish() |
1594 | } |
1595 | } |
1596 | } |
1597 | } |
1598 | #[cfg (feature = "full" )] |
1599 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1600 | impl Debug for crate::ItemConst { |
1601 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1602 | self.debug(formatter, name:"ItemConst" ) |
1603 | } |
1604 | } |
1605 | #[cfg (feature = "full" )] |
1606 | impl crate::ItemConst { |
1607 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1608 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1609 | formatter.field(name:"attrs" , &self.attrs); |
1610 | formatter.field(name:"vis" , &self.vis); |
1611 | formatter.field(name:"const_token" , &self.const_token); |
1612 | formatter.field(name:"ident" , &self.ident); |
1613 | formatter.field(name:"generics" , &self.generics); |
1614 | formatter.field(name:"colon_token" , &self.colon_token); |
1615 | formatter.field(name:"ty" , &self.ty); |
1616 | formatter.field(name:"eq_token" , &self.eq_token); |
1617 | formatter.field(name:"expr" , &self.expr); |
1618 | formatter.field(name:"semi_token" , &self.semi_token); |
1619 | formatter.finish() |
1620 | } |
1621 | } |
1622 | #[cfg (feature = "full" )] |
1623 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1624 | impl Debug for crate::ItemEnum { |
1625 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1626 | self.debug(formatter, name:"ItemEnum" ) |
1627 | } |
1628 | } |
1629 | #[cfg (feature = "full" )] |
1630 | impl crate::ItemEnum { |
1631 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1632 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1633 | formatter.field(name:"attrs" , &self.attrs); |
1634 | formatter.field(name:"vis" , &self.vis); |
1635 | formatter.field(name:"enum_token" , &self.enum_token); |
1636 | formatter.field(name:"ident" , &self.ident); |
1637 | formatter.field(name:"generics" , &self.generics); |
1638 | formatter.field(name:"brace_token" , &self.brace_token); |
1639 | formatter.field(name:"variants" , &self.variants); |
1640 | formatter.finish() |
1641 | } |
1642 | } |
1643 | #[cfg (feature = "full" )] |
1644 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1645 | impl Debug for crate::ItemExternCrate { |
1646 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1647 | self.debug(formatter, name:"ItemExternCrate" ) |
1648 | } |
1649 | } |
1650 | #[cfg (feature = "full" )] |
1651 | impl crate::ItemExternCrate { |
1652 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1653 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1654 | formatter.field(name:"attrs" , &self.attrs); |
1655 | formatter.field(name:"vis" , &self.vis); |
1656 | formatter.field(name:"extern_token" , &self.extern_token); |
1657 | formatter.field(name:"crate_token" , &self.crate_token); |
1658 | formatter.field(name:"ident" , &self.ident); |
1659 | formatter.field(name:"rename" , &self.rename); |
1660 | formatter.field(name:"semi_token" , &self.semi_token); |
1661 | formatter.finish() |
1662 | } |
1663 | } |
1664 | #[cfg (feature = "full" )] |
1665 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1666 | impl Debug for crate::ItemFn { |
1667 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1668 | self.debug(formatter, name:"ItemFn" ) |
1669 | } |
1670 | } |
1671 | #[cfg (feature = "full" )] |
1672 | impl crate::ItemFn { |
1673 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1674 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1675 | formatter.field(name:"attrs" , &self.attrs); |
1676 | formatter.field(name:"vis" , &self.vis); |
1677 | formatter.field(name:"sig" , &self.sig); |
1678 | formatter.field(name:"block" , &self.block); |
1679 | formatter.finish() |
1680 | } |
1681 | } |
1682 | #[cfg (feature = "full" )] |
1683 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1684 | impl Debug for crate::ItemForeignMod { |
1685 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1686 | self.debug(formatter, name:"ItemForeignMod" ) |
1687 | } |
1688 | } |
1689 | #[cfg (feature = "full" )] |
1690 | impl crate::ItemForeignMod { |
1691 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1692 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1693 | formatter.field(name:"attrs" , &self.attrs); |
1694 | formatter.field(name:"unsafety" , &self.unsafety); |
1695 | formatter.field(name:"abi" , &self.abi); |
1696 | formatter.field(name:"brace_token" , &self.brace_token); |
1697 | formatter.field(name:"items" , &self.items); |
1698 | formatter.finish() |
1699 | } |
1700 | } |
1701 | #[cfg (feature = "full" )] |
1702 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1703 | impl Debug for crate::ItemImpl { |
1704 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1705 | self.debug(formatter, name:"ItemImpl" ) |
1706 | } |
1707 | } |
1708 | #[cfg (feature = "full" )] |
1709 | impl crate::ItemImpl { |
1710 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1711 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1712 | formatter.field(name:"attrs" , &self.attrs); |
1713 | formatter.field(name:"defaultness" , &self.defaultness); |
1714 | formatter.field(name:"unsafety" , &self.unsafety); |
1715 | formatter.field(name:"impl_token" , &self.impl_token); |
1716 | formatter.field(name:"generics" , &self.generics); |
1717 | formatter.field(name:"trait_" , &self.trait_); |
1718 | formatter.field(name:"self_ty" , &self.self_ty); |
1719 | formatter.field(name:"brace_token" , &self.brace_token); |
1720 | formatter.field(name:"items" , &self.items); |
1721 | formatter.finish() |
1722 | } |
1723 | } |
1724 | #[cfg (feature = "full" )] |
1725 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1726 | impl Debug for crate::ItemMacro { |
1727 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1728 | self.debug(formatter, name:"ItemMacro" ) |
1729 | } |
1730 | } |
1731 | #[cfg (feature = "full" )] |
1732 | impl crate::ItemMacro { |
1733 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1734 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1735 | formatter.field(name:"attrs" , &self.attrs); |
1736 | formatter.field(name:"ident" , &self.ident); |
1737 | formatter.field(name:"mac" , &self.mac); |
1738 | formatter.field(name:"semi_token" , &self.semi_token); |
1739 | formatter.finish() |
1740 | } |
1741 | } |
1742 | #[cfg (feature = "full" )] |
1743 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1744 | impl Debug for crate::ItemMod { |
1745 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1746 | self.debug(formatter, name:"ItemMod" ) |
1747 | } |
1748 | } |
1749 | #[cfg (feature = "full" )] |
1750 | impl crate::ItemMod { |
1751 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1752 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1753 | formatter.field(name:"attrs" , &self.attrs); |
1754 | formatter.field(name:"vis" , &self.vis); |
1755 | formatter.field(name:"unsafety" , &self.unsafety); |
1756 | formatter.field(name:"mod_token" , &self.mod_token); |
1757 | formatter.field(name:"ident" , &self.ident); |
1758 | formatter.field(name:"content" , &self.content); |
1759 | formatter.field(name:"semi" , &self.semi); |
1760 | formatter.finish() |
1761 | } |
1762 | } |
1763 | #[cfg (feature = "full" )] |
1764 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1765 | impl Debug for crate::ItemStatic { |
1766 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1767 | self.debug(formatter, name:"ItemStatic" ) |
1768 | } |
1769 | } |
1770 | #[cfg (feature = "full" )] |
1771 | impl crate::ItemStatic { |
1772 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1773 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1774 | formatter.field(name:"attrs" , &self.attrs); |
1775 | formatter.field(name:"vis" , &self.vis); |
1776 | formatter.field(name:"static_token" , &self.static_token); |
1777 | formatter.field(name:"mutability" , &self.mutability); |
1778 | formatter.field(name:"ident" , &self.ident); |
1779 | formatter.field(name:"colon_token" , &self.colon_token); |
1780 | formatter.field(name:"ty" , &self.ty); |
1781 | formatter.field(name:"eq_token" , &self.eq_token); |
1782 | formatter.field(name:"expr" , &self.expr); |
1783 | formatter.field(name:"semi_token" , &self.semi_token); |
1784 | formatter.finish() |
1785 | } |
1786 | } |
1787 | #[cfg (feature = "full" )] |
1788 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1789 | impl Debug for crate::ItemStruct { |
1790 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1791 | self.debug(formatter, name:"ItemStruct" ) |
1792 | } |
1793 | } |
1794 | #[cfg (feature = "full" )] |
1795 | impl crate::ItemStruct { |
1796 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1797 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1798 | formatter.field(name:"attrs" , &self.attrs); |
1799 | formatter.field(name:"vis" , &self.vis); |
1800 | formatter.field(name:"struct_token" , &self.struct_token); |
1801 | formatter.field(name:"ident" , &self.ident); |
1802 | formatter.field(name:"generics" , &self.generics); |
1803 | formatter.field(name:"fields" , &self.fields); |
1804 | formatter.field(name:"semi_token" , &self.semi_token); |
1805 | formatter.finish() |
1806 | } |
1807 | } |
1808 | #[cfg (feature = "full" )] |
1809 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1810 | impl Debug for crate::ItemTrait { |
1811 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1812 | self.debug(formatter, name:"ItemTrait" ) |
1813 | } |
1814 | } |
1815 | #[cfg (feature = "full" )] |
1816 | impl crate::ItemTrait { |
1817 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1818 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1819 | formatter.field(name:"attrs" , &self.attrs); |
1820 | formatter.field(name:"vis" , &self.vis); |
1821 | formatter.field(name:"unsafety" , &self.unsafety); |
1822 | formatter.field(name:"auto_token" , &self.auto_token); |
1823 | formatter.field(name:"restriction" , &self.restriction); |
1824 | formatter.field(name:"trait_token" , &self.trait_token); |
1825 | formatter.field(name:"ident" , &self.ident); |
1826 | formatter.field(name:"generics" , &self.generics); |
1827 | formatter.field(name:"colon_token" , &self.colon_token); |
1828 | formatter.field(name:"supertraits" , &self.supertraits); |
1829 | formatter.field(name:"brace_token" , &self.brace_token); |
1830 | formatter.field(name:"items" , &self.items); |
1831 | formatter.finish() |
1832 | } |
1833 | } |
1834 | #[cfg (feature = "full" )] |
1835 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1836 | impl Debug for crate::ItemTraitAlias { |
1837 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1838 | self.debug(formatter, name:"ItemTraitAlias" ) |
1839 | } |
1840 | } |
1841 | #[cfg (feature = "full" )] |
1842 | impl crate::ItemTraitAlias { |
1843 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1844 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1845 | formatter.field(name:"attrs" , &self.attrs); |
1846 | formatter.field(name:"vis" , &self.vis); |
1847 | formatter.field(name:"trait_token" , &self.trait_token); |
1848 | formatter.field(name:"ident" , &self.ident); |
1849 | formatter.field(name:"generics" , &self.generics); |
1850 | formatter.field(name:"eq_token" , &self.eq_token); |
1851 | formatter.field(name:"bounds" , &self.bounds); |
1852 | formatter.field(name:"semi_token" , &self.semi_token); |
1853 | formatter.finish() |
1854 | } |
1855 | } |
1856 | #[cfg (feature = "full" )] |
1857 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1858 | impl Debug for crate::ItemType { |
1859 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1860 | self.debug(formatter, name:"ItemType" ) |
1861 | } |
1862 | } |
1863 | #[cfg (feature = "full" )] |
1864 | impl crate::ItemType { |
1865 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1866 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1867 | formatter.field(name:"attrs" , &self.attrs); |
1868 | formatter.field(name:"vis" , &self.vis); |
1869 | formatter.field(name:"type_token" , &self.type_token); |
1870 | formatter.field(name:"ident" , &self.ident); |
1871 | formatter.field(name:"generics" , &self.generics); |
1872 | formatter.field(name:"eq_token" , &self.eq_token); |
1873 | formatter.field(name:"ty" , &self.ty); |
1874 | formatter.field(name:"semi_token" , &self.semi_token); |
1875 | formatter.finish() |
1876 | } |
1877 | } |
1878 | #[cfg (feature = "full" )] |
1879 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1880 | impl Debug for crate::ItemUnion { |
1881 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1882 | self.debug(formatter, name:"ItemUnion" ) |
1883 | } |
1884 | } |
1885 | #[cfg (feature = "full" )] |
1886 | impl crate::ItemUnion { |
1887 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1888 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1889 | formatter.field(name:"attrs" , &self.attrs); |
1890 | formatter.field(name:"vis" , &self.vis); |
1891 | formatter.field(name:"union_token" , &self.union_token); |
1892 | formatter.field(name:"ident" , &self.ident); |
1893 | formatter.field(name:"generics" , &self.generics); |
1894 | formatter.field(name:"fields" , &self.fields); |
1895 | formatter.finish() |
1896 | } |
1897 | } |
1898 | #[cfg (feature = "full" )] |
1899 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1900 | impl Debug for crate::ItemUse { |
1901 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1902 | self.debug(formatter, name:"ItemUse" ) |
1903 | } |
1904 | } |
1905 | #[cfg (feature = "full" )] |
1906 | impl crate::ItemUse { |
1907 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1908 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1909 | formatter.field(name:"attrs" , &self.attrs); |
1910 | formatter.field(name:"vis" , &self.vis); |
1911 | formatter.field(name:"use_token" , &self.use_token); |
1912 | formatter.field(name:"leading_colon" , &self.leading_colon); |
1913 | formatter.field(name:"tree" , &self.tree); |
1914 | formatter.field(name:"semi_token" , &self.semi_token); |
1915 | formatter.finish() |
1916 | } |
1917 | } |
1918 | #[cfg (feature = "full" )] |
1919 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1920 | impl Debug for crate::Label { |
1921 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1922 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Label" ); |
1923 | formatter.field(name:"name" , &self.name); |
1924 | formatter.field(name:"colon_token" , &self.colon_token); |
1925 | formatter.finish() |
1926 | } |
1927 | } |
1928 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1929 | impl Debug for crate::Lifetime { |
1930 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1931 | self.debug(formatter, name:"Lifetime" ) |
1932 | } |
1933 | } |
1934 | impl crate::Lifetime { |
1935 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1936 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1937 | formatter.field(name:"apostrophe" , &self.apostrophe); |
1938 | formatter.field(name:"ident" , &self.ident); |
1939 | formatter.finish() |
1940 | } |
1941 | } |
1942 | #[cfg (any(feature = "derive" , feature = "full" ))] |
1943 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1944 | impl Debug for crate::LifetimeParam { |
1945 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1946 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"LifetimeParam" ); |
1947 | formatter.field(name:"attrs" , &self.attrs); |
1948 | formatter.field(name:"lifetime" , &self.lifetime); |
1949 | formatter.field(name:"colon_token" , &self.colon_token); |
1950 | formatter.field(name:"bounds" , &self.bounds); |
1951 | formatter.finish() |
1952 | } |
1953 | } |
1954 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1955 | impl Debug for crate::Lit { |
1956 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1957 | formatter.write_str(data:"Lit::" )?; |
1958 | match self { |
1959 | crate::Lit::Str(v0: &LitStr) => v0.debug(formatter, name:"Str" ), |
1960 | crate::Lit::ByteStr(v0: &LitByteStr) => v0.debug(formatter, name:"ByteStr" ), |
1961 | crate::Lit::Byte(v0: &LitByte) => v0.debug(formatter, name:"Byte" ), |
1962 | crate::Lit::Char(v0: &LitChar) => v0.debug(formatter, name:"Char" ), |
1963 | crate::Lit::Int(v0: &LitInt) => v0.debug(formatter, name:"Int" ), |
1964 | crate::Lit::Float(v0: &LitFloat) => v0.debug(formatter, name:"Float" ), |
1965 | crate::Lit::Bool(v0: &LitBool) => v0.debug(formatter, name:"Bool" ), |
1966 | crate::Lit::Verbatim(v0: &Literal) => { |
1967 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Verbatim" ); |
1968 | formatter.field(v0); |
1969 | formatter.finish() |
1970 | } |
1971 | } |
1972 | } |
1973 | } |
1974 | #[cfg (feature = "full" )] |
1975 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1976 | impl Debug for crate::Local { |
1977 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1978 | self.debug(formatter, name:"Local" ) |
1979 | } |
1980 | } |
1981 | #[cfg (feature = "full" )] |
1982 | impl crate::Local { |
1983 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
1984 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
1985 | formatter.field(name:"attrs" , &self.attrs); |
1986 | formatter.field(name:"let_token" , &self.let_token); |
1987 | formatter.field(name:"pat" , &self.pat); |
1988 | formatter.field(name:"init" , &self.init); |
1989 | formatter.field(name:"semi_token" , &self.semi_token); |
1990 | formatter.finish() |
1991 | } |
1992 | } |
1993 | #[cfg (feature = "full" )] |
1994 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
1995 | impl Debug for crate::LocalInit { |
1996 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
1997 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"LocalInit" ); |
1998 | formatter.field(name:"eq_token" , &self.eq_token); |
1999 | formatter.field(name:"expr" , &self.expr); |
2000 | formatter.field(name:"diverge" , &self.diverge); |
2001 | formatter.finish() |
2002 | } |
2003 | } |
2004 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2005 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2006 | impl Debug for crate::Macro { |
2007 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2008 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Macro" ); |
2009 | formatter.field(name:"path" , &self.path); |
2010 | formatter.field(name:"bang_token" , &self.bang_token); |
2011 | formatter.field(name:"delimiter" , &self.delimiter); |
2012 | formatter.field(name:"tokens" , &self.tokens); |
2013 | formatter.finish() |
2014 | } |
2015 | } |
2016 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2017 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2018 | impl Debug for crate::MacroDelimiter { |
2019 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2020 | formatter.write_str(data:"MacroDelimiter::" )?; |
2021 | match self { |
2022 | crate::MacroDelimiter::Paren(v0: &Paren) => { |
2023 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Paren" ); |
2024 | formatter.field(v0); |
2025 | formatter.finish() |
2026 | } |
2027 | crate::MacroDelimiter::Brace(v0: &Brace) => { |
2028 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Brace" ); |
2029 | formatter.field(v0); |
2030 | formatter.finish() |
2031 | } |
2032 | crate::MacroDelimiter::Bracket(v0: &Bracket) => { |
2033 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Bracket" ); |
2034 | formatter.field(v0); |
2035 | formatter.finish() |
2036 | } |
2037 | } |
2038 | } |
2039 | } |
2040 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2041 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2042 | impl Debug for crate::Member { |
2043 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2044 | formatter.write_str(data:"Member::" )?; |
2045 | match self { |
2046 | crate::Member::Named(v0: &Ident) => { |
2047 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Named" ); |
2048 | formatter.field(v0); |
2049 | formatter.finish() |
2050 | } |
2051 | crate::Member::Unnamed(v0: &Index) => { |
2052 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Unnamed" ); |
2053 | formatter.field(v0); |
2054 | formatter.finish() |
2055 | } |
2056 | } |
2057 | } |
2058 | } |
2059 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2060 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2061 | impl Debug for crate::Meta { |
2062 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2063 | formatter.write_str(data:"Meta::" )?; |
2064 | match self { |
2065 | crate::Meta::Path(v0: &Path) => v0.debug(formatter, name:"Path" ), |
2066 | crate::Meta::List(v0: &MetaList) => v0.debug(formatter, name:"List" ), |
2067 | crate::Meta::NameValue(v0: &MetaNameValue) => v0.debug(formatter, name:"NameValue" ), |
2068 | } |
2069 | } |
2070 | } |
2071 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2072 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2073 | impl Debug for crate::MetaList { |
2074 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2075 | self.debug(formatter, name:"MetaList" ) |
2076 | } |
2077 | } |
2078 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2079 | impl crate::MetaList { |
2080 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2081 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2082 | formatter.field(name:"path" , &self.path); |
2083 | formatter.field(name:"delimiter" , &self.delimiter); |
2084 | formatter.field(name:"tokens" , &self.tokens); |
2085 | formatter.finish() |
2086 | } |
2087 | } |
2088 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2089 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2090 | impl Debug for crate::MetaNameValue { |
2091 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2092 | self.debug(formatter, name:"MetaNameValue" ) |
2093 | } |
2094 | } |
2095 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2096 | impl crate::MetaNameValue { |
2097 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2098 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2099 | formatter.field(name:"path" , &self.path); |
2100 | formatter.field(name:"eq_token" , &self.eq_token); |
2101 | formatter.field(name:"value" , &self.value); |
2102 | formatter.finish() |
2103 | } |
2104 | } |
2105 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2106 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2107 | impl Debug for crate::ParenthesizedGenericArguments { |
2108 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2109 | self.debug(formatter, name:"ParenthesizedGenericArguments" ) |
2110 | } |
2111 | } |
2112 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2113 | impl crate::ParenthesizedGenericArguments { |
2114 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2115 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2116 | formatter.field(name:"paren_token" , &self.paren_token); |
2117 | formatter.field(name:"inputs" , &self.inputs); |
2118 | formatter.field(name:"output" , &self.output); |
2119 | formatter.finish() |
2120 | } |
2121 | } |
2122 | #[cfg (feature = "full" )] |
2123 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2124 | impl Debug for crate::Pat { |
2125 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2126 | formatter.write_str("Pat::" )?; |
2127 | match self { |
2128 | crate::Pat::Const(v0) => v0.debug(formatter, "Const" ), |
2129 | crate::Pat::Ident(v0) => v0.debug(formatter, "Ident" ), |
2130 | crate::Pat::Lit(v0) => v0.debug(formatter, "Lit" ), |
2131 | crate::Pat::Macro(v0) => v0.debug(formatter, "Macro" ), |
2132 | crate::Pat::Or(v0) => v0.debug(formatter, "Or" ), |
2133 | crate::Pat::Paren(v0) => v0.debug(formatter, "Paren" ), |
2134 | crate::Pat::Path(v0) => v0.debug(formatter, "Path" ), |
2135 | crate::Pat::Range(v0) => v0.debug(formatter, "Range" ), |
2136 | crate::Pat::Reference(v0) => v0.debug(formatter, "Reference" ), |
2137 | crate::Pat::Rest(v0) => v0.debug(formatter, "Rest" ), |
2138 | crate::Pat::Slice(v0) => v0.debug(formatter, "Slice" ), |
2139 | crate::Pat::Struct(v0) => v0.debug(formatter, "Struct" ), |
2140 | crate::Pat::Tuple(v0) => v0.debug(formatter, "Tuple" ), |
2141 | crate::Pat::TupleStruct(v0) => v0.debug(formatter, "TupleStruct" ), |
2142 | crate::Pat::Type(v0) => v0.debug(formatter, "Type" ), |
2143 | crate::Pat::Verbatim(v0) => { |
2144 | let mut formatter = formatter.debug_tuple("Verbatim" ); |
2145 | formatter.field(v0); |
2146 | formatter.finish() |
2147 | } |
2148 | crate::Pat::Wild(v0) => v0.debug(formatter, "Wild" ), |
2149 | } |
2150 | } |
2151 | } |
2152 | #[cfg (feature = "full" )] |
2153 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2154 | impl Debug for crate::PatIdent { |
2155 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2156 | self.debug(formatter, name:"PatIdent" ) |
2157 | } |
2158 | } |
2159 | #[cfg (feature = "full" )] |
2160 | impl crate::PatIdent { |
2161 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2162 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2163 | formatter.field(name:"attrs" , &self.attrs); |
2164 | formatter.field(name:"by_ref" , &self.by_ref); |
2165 | formatter.field(name:"mutability" , &self.mutability); |
2166 | formatter.field(name:"ident" , &self.ident); |
2167 | formatter.field(name:"subpat" , &self.subpat); |
2168 | formatter.finish() |
2169 | } |
2170 | } |
2171 | #[cfg (feature = "full" )] |
2172 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2173 | impl Debug for crate::PatOr { |
2174 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2175 | self.debug(formatter, name:"PatOr" ) |
2176 | } |
2177 | } |
2178 | #[cfg (feature = "full" )] |
2179 | impl crate::PatOr { |
2180 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2181 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2182 | formatter.field(name:"attrs" , &self.attrs); |
2183 | formatter.field(name:"leading_vert" , &self.leading_vert); |
2184 | formatter.field(name:"cases" , &self.cases); |
2185 | formatter.finish() |
2186 | } |
2187 | } |
2188 | #[cfg (feature = "full" )] |
2189 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2190 | impl Debug for crate::PatParen { |
2191 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2192 | self.debug(formatter, name:"PatParen" ) |
2193 | } |
2194 | } |
2195 | #[cfg (feature = "full" )] |
2196 | impl crate::PatParen { |
2197 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2198 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2199 | formatter.field(name:"attrs" , &self.attrs); |
2200 | formatter.field(name:"paren_token" , &self.paren_token); |
2201 | formatter.field(name:"pat" , &self.pat); |
2202 | formatter.finish() |
2203 | } |
2204 | } |
2205 | #[cfg (feature = "full" )] |
2206 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2207 | impl Debug for crate::PatReference { |
2208 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2209 | self.debug(formatter, name:"PatReference" ) |
2210 | } |
2211 | } |
2212 | #[cfg (feature = "full" )] |
2213 | impl crate::PatReference { |
2214 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2215 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2216 | formatter.field(name:"attrs" , &self.attrs); |
2217 | formatter.field(name:"and_token" , &self.and_token); |
2218 | formatter.field(name:"mutability" , &self.mutability); |
2219 | formatter.field(name:"pat" , &self.pat); |
2220 | formatter.finish() |
2221 | } |
2222 | } |
2223 | #[cfg (feature = "full" )] |
2224 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2225 | impl Debug for crate::PatRest { |
2226 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2227 | self.debug(formatter, name:"PatRest" ) |
2228 | } |
2229 | } |
2230 | #[cfg (feature = "full" )] |
2231 | impl crate::PatRest { |
2232 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2233 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2234 | formatter.field(name:"attrs" , &self.attrs); |
2235 | formatter.field(name:"dot2_token" , &self.dot2_token); |
2236 | formatter.finish() |
2237 | } |
2238 | } |
2239 | #[cfg (feature = "full" )] |
2240 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2241 | impl Debug for crate::PatSlice { |
2242 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2243 | self.debug(formatter, name:"PatSlice" ) |
2244 | } |
2245 | } |
2246 | #[cfg (feature = "full" )] |
2247 | impl crate::PatSlice { |
2248 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2249 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2250 | formatter.field(name:"attrs" , &self.attrs); |
2251 | formatter.field(name:"bracket_token" , &self.bracket_token); |
2252 | formatter.field(name:"elems" , &self.elems); |
2253 | formatter.finish() |
2254 | } |
2255 | } |
2256 | #[cfg (feature = "full" )] |
2257 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2258 | impl Debug for crate::PatStruct { |
2259 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2260 | self.debug(formatter, name:"PatStruct" ) |
2261 | } |
2262 | } |
2263 | #[cfg (feature = "full" )] |
2264 | impl crate::PatStruct { |
2265 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2266 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2267 | formatter.field(name:"attrs" , &self.attrs); |
2268 | formatter.field(name:"qself" , &self.qself); |
2269 | formatter.field(name:"path" , &self.path); |
2270 | formatter.field(name:"brace_token" , &self.brace_token); |
2271 | formatter.field(name:"fields" , &self.fields); |
2272 | formatter.field(name:"rest" , &self.rest); |
2273 | formatter.finish() |
2274 | } |
2275 | } |
2276 | #[cfg (feature = "full" )] |
2277 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2278 | impl Debug for crate::PatTuple { |
2279 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2280 | self.debug(formatter, name:"PatTuple" ) |
2281 | } |
2282 | } |
2283 | #[cfg (feature = "full" )] |
2284 | impl crate::PatTuple { |
2285 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2286 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2287 | formatter.field(name:"attrs" , &self.attrs); |
2288 | formatter.field(name:"paren_token" , &self.paren_token); |
2289 | formatter.field(name:"elems" , &self.elems); |
2290 | formatter.finish() |
2291 | } |
2292 | } |
2293 | #[cfg (feature = "full" )] |
2294 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2295 | impl Debug for crate::PatTupleStruct { |
2296 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2297 | self.debug(formatter, name:"PatTupleStruct" ) |
2298 | } |
2299 | } |
2300 | #[cfg (feature = "full" )] |
2301 | impl crate::PatTupleStruct { |
2302 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2303 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2304 | formatter.field(name:"attrs" , &self.attrs); |
2305 | formatter.field(name:"qself" , &self.qself); |
2306 | formatter.field(name:"path" , &self.path); |
2307 | formatter.field(name:"paren_token" , &self.paren_token); |
2308 | formatter.field(name:"elems" , &self.elems); |
2309 | formatter.finish() |
2310 | } |
2311 | } |
2312 | #[cfg (feature = "full" )] |
2313 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2314 | impl Debug for crate::PatType { |
2315 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2316 | self.debug(formatter, name:"PatType" ) |
2317 | } |
2318 | } |
2319 | #[cfg (feature = "full" )] |
2320 | impl crate::PatType { |
2321 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2322 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2323 | formatter.field(name:"attrs" , &self.attrs); |
2324 | formatter.field(name:"pat" , &self.pat); |
2325 | formatter.field(name:"colon_token" , &self.colon_token); |
2326 | formatter.field(name:"ty" , &self.ty); |
2327 | formatter.finish() |
2328 | } |
2329 | } |
2330 | #[cfg (feature = "full" )] |
2331 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2332 | impl Debug for crate::PatWild { |
2333 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2334 | self.debug(formatter, name:"PatWild" ) |
2335 | } |
2336 | } |
2337 | #[cfg (feature = "full" )] |
2338 | impl crate::PatWild { |
2339 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2340 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2341 | formatter.field(name:"attrs" , &self.attrs); |
2342 | formatter.field(name:"underscore_token" , &self.underscore_token); |
2343 | formatter.finish() |
2344 | } |
2345 | } |
2346 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2347 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2348 | impl Debug for crate::Path { |
2349 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2350 | self.debug(formatter, name:"Path" ) |
2351 | } |
2352 | } |
2353 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2354 | impl crate::Path { |
2355 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2356 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2357 | formatter.field(name:"leading_colon" , &self.leading_colon); |
2358 | formatter.field(name:"segments" , &self.segments); |
2359 | formatter.finish() |
2360 | } |
2361 | } |
2362 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2363 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2364 | impl Debug for crate::PathArguments { |
2365 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2366 | formatter.write_str(data:"PathArguments::" )?; |
2367 | match self { |
2368 | crate::PathArguments::None => formatter.write_str(data:"None" ), |
2369 | crate::PathArguments::AngleBracketed(v0: &AngleBracketedGenericArguments) => { |
2370 | v0.debug(formatter, name:"AngleBracketed" ) |
2371 | } |
2372 | crate::PathArguments::Parenthesized(v0: &ParenthesizedGenericArguments) => { |
2373 | v0.debug(formatter, name:"Parenthesized" ) |
2374 | } |
2375 | } |
2376 | } |
2377 | } |
2378 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2379 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2380 | impl Debug for crate::PathSegment { |
2381 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2382 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"PathSegment" ); |
2383 | formatter.field(name:"ident" , &self.ident); |
2384 | formatter.field(name:"arguments" , &self.arguments); |
2385 | formatter.finish() |
2386 | } |
2387 | } |
2388 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2389 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2390 | impl Debug for crate::PredicateLifetime { |
2391 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2392 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"PredicateLifetime" ); |
2393 | formatter.field(name:"lifetime" , &self.lifetime); |
2394 | formatter.field(name:"colon_token" , &self.colon_token); |
2395 | formatter.field(name:"bounds" , &self.bounds); |
2396 | formatter.finish() |
2397 | } |
2398 | } |
2399 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2400 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2401 | impl Debug for crate::PredicateType { |
2402 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2403 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"PredicateType" ); |
2404 | formatter.field(name:"lifetimes" , &self.lifetimes); |
2405 | formatter.field(name:"bounded_ty" , &self.bounded_ty); |
2406 | formatter.field(name:"colon_token" , &self.colon_token); |
2407 | formatter.field(name:"bounds" , &self.bounds); |
2408 | formatter.finish() |
2409 | } |
2410 | } |
2411 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2412 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2413 | impl Debug for crate::QSelf { |
2414 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2415 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"QSelf" ); |
2416 | formatter.field(name:"lt_token" , &self.lt_token); |
2417 | formatter.field(name:"ty" , &self.ty); |
2418 | formatter.field(name:"position" , &self.position); |
2419 | formatter.field(name:"as_token" , &self.as_token); |
2420 | formatter.field(name:"gt_token" , &self.gt_token); |
2421 | formatter.finish() |
2422 | } |
2423 | } |
2424 | #[cfg (feature = "full" )] |
2425 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2426 | impl Debug for crate::RangeLimits { |
2427 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2428 | formatter.write_str(data:"RangeLimits::" )?; |
2429 | match self { |
2430 | crate::RangeLimits::HalfOpen(v0: &DotDot) => { |
2431 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"HalfOpen" ); |
2432 | formatter.field(v0); |
2433 | formatter.finish() |
2434 | } |
2435 | crate::RangeLimits::Closed(v0: &DotDotEq) => { |
2436 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Closed" ); |
2437 | formatter.field(v0); |
2438 | formatter.finish() |
2439 | } |
2440 | } |
2441 | } |
2442 | } |
2443 | #[cfg (feature = "full" )] |
2444 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2445 | impl Debug for crate::Receiver { |
2446 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2447 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Receiver" ); |
2448 | formatter.field(name:"attrs" , &self.attrs); |
2449 | formatter.field(name:"reference" , &self.reference); |
2450 | formatter.field(name:"mutability" , &self.mutability); |
2451 | formatter.field(name:"self_token" , &self.self_token); |
2452 | formatter.field(name:"colon_token" , &self.colon_token); |
2453 | formatter.field(name:"ty" , &self.ty); |
2454 | formatter.finish() |
2455 | } |
2456 | } |
2457 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2458 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2459 | impl Debug for crate::ReturnType { |
2460 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2461 | formatter.write_str(data:"ReturnType::" )?; |
2462 | match self { |
2463 | crate::ReturnType::Default => formatter.write_str(data:"Default" ), |
2464 | crate::ReturnType::Type(v0: &RArrow, v1: &Box) => { |
2465 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Type" ); |
2466 | formatter.field(v0); |
2467 | formatter.field(v1); |
2468 | formatter.finish() |
2469 | } |
2470 | } |
2471 | } |
2472 | } |
2473 | #[cfg (feature = "full" )] |
2474 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2475 | impl Debug for crate::Signature { |
2476 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2477 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Signature" ); |
2478 | formatter.field(name:"constness" , &self.constness); |
2479 | formatter.field(name:"asyncness" , &self.asyncness); |
2480 | formatter.field(name:"unsafety" , &self.unsafety); |
2481 | formatter.field(name:"abi" , &self.abi); |
2482 | formatter.field(name:"fn_token" , &self.fn_token); |
2483 | formatter.field(name:"ident" , &self.ident); |
2484 | formatter.field(name:"generics" , &self.generics); |
2485 | formatter.field(name:"paren_token" , &self.paren_token); |
2486 | formatter.field(name:"inputs" , &self.inputs); |
2487 | formatter.field(name:"variadic" , &self.variadic); |
2488 | formatter.field(name:"output" , &self.output); |
2489 | formatter.finish() |
2490 | } |
2491 | } |
2492 | #[cfg (feature = "full" )] |
2493 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2494 | impl Debug for crate::StaticMutability { |
2495 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2496 | formatter.write_str(data:"StaticMutability::" )?; |
2497 | match self { |
2498 | crate::StaticMutability::Mut(v0: &Mut) => { |
2499 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Mut" ); |
2500 | formatter.field(v0); |
2501 | formatter.finish() |
2502 | } |
2503 | crate::StaticMutability::None => formatter.write_str(data:"None" ), |
2504 | } |
2505 | } |
2506 | } |
2507 | #[cfg (feature = "full" )] |
2508 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2509 | impl Debug for crate::Stmt { |
2510 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2511 | formatter.write_str(data:"Stmt::" )?; |
2512 | match self { |
2513 | crate::Stmt::Local(v0: &Local) => v0.debug(formatter, name:"Local" ), |
2514 | crate::Stmt::Item(v0: &Item) => { |
2515 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Item" ); |
2516 | formatter.field(v0); |
2517 | formatter.finish() |
2518 | } |
2519 | crate::Stmt::Expr(v0: &Expr, v1: &Option) => { |
2520 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Expr" ); |
2521 | formatter.field(v0); |
2522 | formatter.field(v1); |
2523 | formatter.finish() |
2524 | } |
2525 | crate::Stmt::Macro(v0: &StmtMacro) => v0.debug(formatter, name:"Macro" ), |
2526 | } |
2527 | } |
2528 | } |
2529 | #[cfg (feature = "full" )] |
2530 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2531 | impl Debug for crate::StmtMacro { |
2532 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2533 | self.debug(formatter, name:"StmtMacro" ) |
2534 | } |
2535 | } |
2536 | #[cfg (feature = "full" )] |
2537 | impl crate::StmtMacro { |
2538 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2539 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2540 | formatter.field(name:"attrs" , &self.attrs); |
2541 | formatter.field(name:"mac" , &self.mac); |
2542 | formatter.field(name:"semi_token" , &self.semi_token); |
2543 | formatter.finish() |
2544 | } |
2545 | } |
2546 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2547 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2548 | impl Debug for crate::TraitBound { |
2549 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2550 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"TraitBound" ); |
2551 | formatter.field(name:"paren_token" , &self.paren_token); |
2552 | formatter.field(name:"modifier" , &self.modifier); |
2553 | formatter.field(name:"lifetimes" , &self.lifetimes); |
2554 | formatter.field(name:"path" , &self.path); |
2555 | formatter.finish() |
2556 | } |
2557 | } |
2558 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2559 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2560 | impl Debug for crate::TraitBoundModifier { |
2561 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2562 | formatter.write_str(data:"TraitBoundModifier::" )?; |
2563 | match self { |
2564 | crate::TraitBoundModifier::None => formatter.write_str(data:"None" ), |
2565 | crate::TraitBoundModifier::Maybe(v0: &Question) => { |
2566 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Maybe" ); |
2567 | formatter.field(v0); |
2568 | formatter.finish() |
2569 | } |
2570 | } |
2571 | } |
2572 | } |
2573 | #[cfg (feature = "full" )] |
2574 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2575 | impl Debug for crate::TraitItem { |
2576 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2577 | formatter.write_str(data:"TraitItem::" )?; |
2578 | match self { |
2579 | crate::TraitItem::Const(v0: &TraitItemConst) => v0.debug(formatter, name:"Const" ), |
2580 | crate::TraitItem::Fn(v0: &TraitItemFn) => v0.debug(formatter, name:"Fn" ), |
2581 | crate::TraitItem::Type(v0: &TraitItemType) => v0.debug(formatter, name:"Type" ), |
2582 | crate::TraitItem::Macro(v0: &TraitItemMacro) => v0.debug(formatter, name:"Macro" ), |
2583 | crate::TraitItem::Verbatim(v0: &TokenStream) => { |
2584 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Verbatim" ); |
2585 | formatter.field(v0); |
2586 | formatter.finish() |
2587 | } |
2588 | } |
2589 | } |
2590 | } |
2591 | #[cfg (feature = "full" )] |
2592 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2593 | impl Debug for crate::TraitItemConst { |
2594 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2595 | self.debug(formatter, name:"TraitItemConst" ) |
2596 | } |
2597 | } |
2598 | #[cfg (feature = "full" )] |
2599 | impl crate::TraitItemConst { |
2600 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2601 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2602 | formatter.field(name:"attrs" , &self.attrs); |
2603 | formatter.field(name:"const_token" , &self.const_token); |
2604 | formatter.field(name:"ident" , &self.ident); |
2605 | formatter.field(name:"generics" , &self.generics); |
2606 | formatter.field(name:"colon_token" , &self.colon_token); |
2607 | formatter.field(name:"ty" , &self.ty); |
2608 | formatter.field(name:"default" , &self.default); |
2609 | formatter.field(name:"semi_token" , &self.semi_token); |
2610 | formatter.finish() |
2611 | } |
2612 | } |
2613 | #[cfg (feature = "full" )] |
2614 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2615 | impl Debug for crate::TraitItemFn { |
2616 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2617 | self.debug(formatter, name:"TraitItemFn" ) |
2618 | } |
2619 | } |
2620 | #[cfg (feature = "full" )] |
2621 | impl crate::TraitItemFn { |
2622 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2623 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2624 | formatter.field(name:"attrs" , &self.attrs); |
2625 | formatter.field(name:"sig" , &self.sig); |
2626 | formatter.field(name:"default" , &self.default); |
2627 | formatter.field(name:"semi_token" , &self.semi_token); |
2628 | formatter.finish() |
2629 | } |
2630 | } |
2631 | #[cfg (feature = "full" )] |
2632 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2633 | impl Debug for crate::TraitItemMacro { |
2634 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2635 | self.debug(formatter, name:"TraitItemMacro" ) |
2636 | } |
2637 | } |
2638 | #[cfg (feature = "full" )] |
2639 | impl crate::TraitItemMacro { |
2640 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2641 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2642 | formatter.field(name:"attrs" , &self.attrs); |
2643 | formatter.field(name:"mac" , &self.mac); |
2644 | formatter.field(name:"semi_token" , &self.semi_token); |
2645 | formatter.finish() |
2646 | } |
2647 | } |
2648 | #[cfg (feature = "full" )] |
2649 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2650 | impl Debug for crate::TraitItemType { |
2651 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2652 | self.debug(formatter, name:"TraitItemType" ) |
2653 | } |
2654 | } |
2655 | #[cfg (feature = "full" )] |
2656 | impl crate::TraitItemType { |
2657 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2658 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2659 | formatter.field(name:"attrs" , &self.attrs); |
2660 | formatter.field(name:"type_token" , &self.type_token); |
2661 | formatter.field(name:"ident" , &self.ident); |
2662 | formatter.field(name:"generics" , &self.generics); |
2663 | formatter.field(name:"colon_token" , &self.colon_token); |
2664 | formatter.field(name:"bounds" , &self.bounds); |
2665 | formatter.field(name:"default" , &self.default); |
2666 | formatter.field(name:"semi_token" , &self.semi_token); |
2667 | formatter.finish() |
2668 | } |
2669 | } |
2670 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2671 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2672 | impl Debug for crate::Type { |
2673 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2674 | formatter.write_str("Type::" )?; |
2675 | match self { |
2676 | crate::Type::Array(v0) => v0.debug(formatter, "Array" ), |
2677 | crate::Type::BareFn(v0) => v0.debug(formatter, "BareFn" ), |
2678 | crate::Type::Group(v0) => v0.debug(formatter, "Group" ), |
2679 | crate::Type::ImplTrait(v0) => v0.debug(formatter, "ImplTrait" ), |
2680 | crate::Type::Infer(v0) => v0.debug(formatter, "Infer" ), |
2681 | crate::Type::Macro(v0) => v0.debug(formatter, "Macro" ), |
2682 | crate::Type::Never(v0) => v0.debug(formatter, "Never" ), |
2683 | crate::Type::Paren(v0) => v0.debug(formatter, "Paren" ), |
2684 | crate::Type::Path(v0) => v0.debug(formatter, "Path" ), |
2685 | crate::Type::Ptr(v0) => v0.debug(formatter, "Ptr" ), |
2686 | crate::Type::Reference(v0) => v0.debug(formatter, "Reference" ), |
2687 | crate::Type::Slice(v0) => v0.debug(formatter, "Slice" ), |
2688 | crate::Type::TraitObject(v0) => v0.debug(formatter, "TraitObject" ), |
2689 | crate::Type::Tuple(v0) => v0.debug(formatter, "Tuple" ), |
2690 | crate::Type::Verbatim(v0) => { |
2691 | let mut formatter = formatter.debug_tuple("Verbatim" ); |
2692 | formatter.field(v0); |
2693 | formatter.finish() |
2694 | } |
2695 | } |
2696 | } |
2697 | } |
2698 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2699 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2700 | impl Debug for crate::TypeArray { |
2701 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2702 | self.debug(formatter, name:"TypeArray" ) |
2703 | } |
2704 | } |
2705 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2706 | impl crate::TypeArray { |
2707 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2708 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2709 | formatter.field(name:"bracket_token" , &self.bracket_token); |
2710 | formatter.field(name:"elem" , &self.elem); |
2711 | formatter.field(name:"semi_token" , &self.semi_token); |
2712 | formatter.field(name:"len" , &self.len); |
2713 | formatter.finish() |
2714 | } |
2715 | } |
2716 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2717 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2718 | impl Debug for crate::TypeBareFn { |
2719 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2720 | self.debug(formatter, name:"TypeBareFn" ) |
2721 | } |
2722 | } |
2723 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2724 | impl crate::TypeBareFn { |
2725 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2726 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2727 | formatter.field(name:"lifetimes" , &self.lifetimes); |
2728 | formatter.field(name:"unsafety" , &self.unsafety); |
2729 | formatter.field(name:"abi" , &self.abi); |
2730 | formatter.field(name:"fn_token" , &self.fn_token); |
2731 | formatter.field(name:"paren_token" , &self.paren_token); |
2732 | formatter.field(name:"inputs" , &self.inputs); |
2733 | formatter.field(name:"variadic" , &self.variadic); |
2734 | formatter.field(name:"output" , &self.output); |
2735 | formatter.finish() |
2736 | } |
2737 | } |
2738 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2739 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2740 | impl Debug for crate::TypeGroup { |
2741 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2742 | self.debug(formatter, name:"TypeGroup" ) |
2743 | } |
2744 | } |
2745 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2746 | impl crate::TypeGroup { |
2747 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2748 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2749 | formatter.field(name:"group_token" , &self.group_token); |
2750 | formatter.field(name:"elem" , &self.elem); |
2751 | formatter.finish() |
2752 | } |
2753 | } |
2754 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2755 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2756 | impl Debug for crate::TypeImplTrait { |
2757 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2758 | self.debug(formatter, name:"TypeImplTrait" ) |
2759 | } |
2760 | } |
2761 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2762 | impl crate::TypeImplTrait { |
2763 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2764 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2765 | formatter.field(name:"impl_token" , &self.impl_token); |
2766 | formatter.field(name:"bounds" , &self.bounds); |
2767 | formatter.finish() |
2768 | } |
2769 | } |
2770 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2771 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2772 | impl Debug for crate::TypeInfer { |
2773 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2774 | self.debug(formatter, name:"TypeInfer" ) |
2775 | } |
2776 | } |
2777 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2778 | impl crate::TypeInfer { |
2779 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2780 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2781 | formatter.field(name:"underscore_token" , &self.underscore_token); |
2782 | formatter.finish() |
2783 | } |
2784 | } |
2785 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2786 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2787 | impl Debug for crate::TypeMacro { |
2788 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2789 | self.debug(formatter, name:"TypeMacro" ) |
2790 | } |
2791 | } |
2792 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2793 | impl crate::TypeMacro { |
2794 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2795 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2796 | formatter.field(name:"mac" , &self.mac); |
2797 | formatter.finish() |
2798 | } |
2799 | } |
2800 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2801 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2802 | impl Debug for crate::TypeNever { |
2803 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2804 | self.debug(formatter, name:"TypeNever" ) |
2805 | } |
2806 | } |
2807 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2808 | impl crate::TypeNever { |
2809 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2810 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2811 | formatter.field(name:"bang_token" , &self.bang_token); |
2812 | formatter.finish() |
2813 | } |
2814 | } |
2815 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2816 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2817 | impl Debug for crate::TypeParam { |
2818 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2819 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"TypeParam" ); |
2820 | formatter.field(name:"attrs" , &self.attrs); |
2821 | formatter.field(name:"ident" , &self.ident); |
2822 | formatter.field(name:"colon_token" , &self.colon_token); |
2823 | formatter.field(name:"bounds" , &self.bounds); |
2824 | formatter.field(name:"eq_token" , &self.eq_token); |
2825 | formatter.field(name:"default" , &self.default); |
2826 | formatter.finish() |
2827 | } |
2828 | } |
2829 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2830 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2831 | impl Debug for crate::TypeParamBound { |
2832 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2833 | formatter.write_str(data:"TypeParamBound::" )?; |
2834 | match self { |
2835 | crate::TypeParamBound::Trait(v0: &TraitBound) => { |
2836 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Trait" ); |
2837 | formatter.field(v0); |
2838 | formatter.finish() |
2839 | } |
2840 | crate::TypeParamBound::Lifetime(v0: &Lifetime) => v0.debug(formatter, name:"Lifetime" ), |
2841 | crate::TypeParamBound::Verbatim(v0: &TokenStream) => { |
2842 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Verbatim" ); |
2843 | formatter.field(v0); |
2844 | formatter.finish() |
2845 | } |
2846 | } |
2847 | } |
2848 | } |
2849 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2850 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2851 | impl Debug for crate::TypeParen { |
2852 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2853 | self.debug(formatter, name:"TypeParen" ) |
2854 | } |
2855 | } |
2856 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2857 | impl crate::TypeParen { |
2858 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2859 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2860 | formatter.field(name:"paren_token" , &self.paren_token); |
2861 | formatter.field(name:"elem" , &self.elem); |
2862 | formatter.finish() |
2863 | } |
2864 | } |
2865 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2866 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2867 | impl Debug for crate::TypePath { |
2868 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2869 | self.debug(formatter, name:"TypePath" ) |
2870 | } |
2871 | } |
2872 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2873 | impl crate::TypePath { |
2874 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2875 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2876 | formatter.field(name:"qself" , &self.qself); |
2877 | formatter.field(name:"path" , &self.path); |
2878 | formatter.finish() |
2879 | } |
2880 | } |
2881 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2882 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2883 | impl Debug for crate::TypePtr { |
2884 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2885 | self.debug(formatter, name:"TypePtr" ) |
2886 | } |
2887 | } |
2888 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2889 | impl crate::TypePtr { |
2890 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2891 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2892 | formatter.field(name:"star_token" , &self.star_token); |
2893 | formatter.field(name:"const_token" , &self.const_token); |
2894 | formatter.field(name:"mutability" , &self.mutability); |
2895 | formatter.field(name:"elem" , &self.elem); |
2896 | formatter.finish() |
2897 | } |
2898 | } |
2899 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2900 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2901 | impl Debug for crate::TypeReference { |
2902 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2903 | self.debug(formatter, name:"TypeReference" ) |
2904 | } |
2905 | } |
2906 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2907 | impl crate::TypeReference { |
2908 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2909 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2910 | formatter.field(name:"and_token" , &self.and_token); |
2911 | formatter.field(name:"lifetime" , &self.lifetime); |
2912 | formatter.field(name:"mutability" , &self.mutability); |
2913 | formatter.field(name:"elem" , &self.elem); |
2914 | formatter.finish() |
2915 | } |
2916 | } |
2917 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2918 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2919 | impl Debug for crate::TypeSlice { |
2920 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2921 | self.debug(formatter, name:"TypeSlice" ) |
2922 | } |
2923 | } |
2924 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2925 | impl crate::TypeSlice { |
2926 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2927 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2928 | formatter.field(name:"bracket_token" , &self.bracket_token); |
2929 | formatter.field(name:"elem" , &self.elem); |
2930 | formatter.finish() |
2931 | } |
2932 | } |
2933 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2934 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2935 | impl Debug for crate::TypeTraitObject { |
2936 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2937 | self.debug(formatter, name:"TypeTraitObject" ) |
2938 | } |
2939 | } |
2940 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2941 | impl crate::TypeTraitObject { |
2942 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2943 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2944 | formatter.field(name:"dyn_token" , &self.dyn_token); |
2945 | formatter.field(name:"bounds" , &self.bounds); |
2946 | formatter.finish() |
2947 | } |
2948 | } |
2949 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2950 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2951 | impl Debug for crate::TypeTuple { |
2952 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2953 | self.debug(formatter, name:"TypeTuple" ) |
2954 | } |
2955 | } |
2956 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2957 | impl crate::TypeTuple { |
2958 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
2959 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
2960 | formatter.field(name:"paren_token" , &self.paren_token); |
2961 | formatter.field(name:"elems" , &self.elems); |
2962 | formatter.finish() |
2963 | } |
2964 | } |
2965 | #[cfg (any(feature = "derive" , feature = "full" ))] |
2966 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2967 | impl Debug for crate::UnOp { |
2968 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2969 | formatter.write_str(data:"UnOp::" )?; |
2970 | match self { |
2971 | crate::UnOp::Deref(v0: &Star) => { |
2972 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Deref" ); |
2973 | formatter.field(v0); |
2974 | formatter.finish() |
2975 | } |
2976 | crate::UnOp::Not(v0: &Not) => { |
2977 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Not" ); |
2978 | formatter.field(v0); |
2979 | formatter.finish() |
2980 | } |
2981 | crate::UnOp::Neg(v0: &Minus) => { |
2982 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Neg" ); |
2983 | formatter.field(v0); |
2984 | formatter.finish() |
2985 | } |
2986 | } |
2987 | } |
2988 | } |
2989 | #[cfg (feature = "full" )] |
2990 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
2991 | impl Debug for crate::UseGlob { |
2992 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
2993 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"UseGlob" ); |
2994 | formatter.field(name:"star_token" , &self.star_token); |
2995 | formatter.finish() |
2996 | } |
2997 | } |
2998 | #[cfg (feature = "full" )] |
2999 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3000 | impl Debug for crate::UseGroup { |
3001 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3002 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"UseGroup" ); |
3003 | formatter.field(name:"brace_token" , &self.brace_token); |
3004 | formatter.field(name:"items" , &self.items); |
3005 | formatter.finish() |
3006 | } |
3007 | } |
3008 | #[cfg (feature = "full" )] |
3009 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3010 | impl Debug for crate::UseName { |
3011 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3012 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"UseName" ); |
3013 | formatter.field(name:"ident" , &self.ident); |
3014 | formatter.finish() |
3015 | } |
3016 | } |
3017 | #[cfg (feature = "full" )] |
3018 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3019 | impl Debug for crate::UsePath { |
3020 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3021 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"UsePath" ); |
3022 | formatter.field(name:"ident" , &self.ident); |
3023 | formatter.field(name:"colon2_token" , &self.colon2_token); |
3024 | formatter.field(name:"tree" , &self.tree); |
3025 | formatter.finish() |
3026 | } |
3027 | } |
3028 | #[cfg (feature = "full" )] |
3029 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3030 | impl Debug for crate::UseRename { |
3031 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3032 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"UseRename" ); |
3033 | formatter.field(name:"ident" , &self.ident); |
3034 | formatter.field(name:"as_token" , &self.as_token); |
3035 | formatter.field(name:"rename" , &self.rename); |
3036 | formatter.finish() |
3037 | } |
3038 | } |
3039 | #[cfg (feature = "full" )] |
3040 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3041 | impl Debug for crate::UseTree { |
3042 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3043 | formatter.write_str("UseTree::" )?; |
3044 | match self { |
3045 | crate::UseTree::Path(v0) => { |
3046 | let mut formatter = formatter.debug_tuple("Path" ); |
3047 | formatter.field(v0); |
3048 | formatter.finish() |
3049 | } |
3050 | crate::UseTree::Name(v0) => { |
3051 | let mut formatter = formatter.debug_tuple("Name" ); |
3052 | formatter.field(v0); |
3053 | formatter.finish() |
3054 | } |
3055 | crate::UseTree::Rename(v0) => { |
3056 | let mut formatter = formatter.debug_tuple("Rename" ); |
3057 | formatter.field(v0); |
3058 | formatter.finish() |
3059 | } |
3060 | crate::UseTree::Glob(v0) => { |
3061 | let mut formatter = formatter.debug_tuple("Glob" ); |
3062 | formatter.field(v0); |
3063 | formatter.finish() |
3064 | } |
3065 | crate::UseTree::Group(v0) => { |
3066 | let mut formatter = formatter.debug_tuple("Group" ); |
3067 | formatter.field(v0); |
3068 | formatter.finish() |
3069 | } |
3070 | } |
3071 | } |
3072 | } |
3073 | #[cfg (feature = "full" )] |
3074 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3075 | impl Debug for crate::Variadic { |
3076 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3077 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Variadic" ); |
3078 | formatter.field(name:"attrs" , &self.attrs); |
3079 | formatter.field(name:"pat" , &self.pat); |
3080 | formatter.field(name:"dots" , &self.dots); |
3081 | formatter.field(name:"comma" , &self.comma); |
3082 | formatter.finish() |
3083 | } |
3084 | } |
3085 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3086 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3087 | impl Debug for crate::Variant { |
3088 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3089 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"Variant" ); |
3090 | formatter.field(name:"attrs" , &self.attrs); |
3091 | formatter.field(name:"ident" , &self.ident); |
3092 | formatter.field(name:"fields" , &self.fields); |
3093 | formatter.field(name:"discriminant" , &self.discriminant); |
3094 | formatter.finish() |
3095 | } |
3096 | } |
3097 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3098 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3099 | impl Debug for crate::VisRestricted { |
3100 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3101 | self.debug(formatter, name:"VisRestricted" ) |
3102 | } |
3103 | } |
3104 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3105 | impl crate::VisRestricted { |
3106 | fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { |
3107 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name); |
3108 | formatter.field(name:"pub_token" , &self.pub_token); |
3109 | formatter.field(name:"paren_token" , &self.paren_token); |
3110 | formatter.field(name:"in_token" , &self.in_token); |
3111 | formatter.field(name:"path" , &self.path); |
3112 | formatter.finish() |
3113 | } |
3114 | } |
3115 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3116 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3117 | impl Debug for crate::Visibility { |
3118 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3119 | formatter.write_str(data:"Visibility::" )?; |
3120 | match self { |
3121 | crate::Visibility::Public(v0: &Pub) => { |
3122 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Public" ); |
3123 | formatter.field(v0); |
3124 | formatter.finish() |
3125 | } |
3126 | crate::Visibility::Restricted(v0: &VisRestricted) => v0.debug(formatter, name:"Restricted" ), |
3127 | crate::Visibility::Inherited => formatter.write_str(data:"Inherited" ), |
3128 | } |
3129 | } |
3130 | } |
3131 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3132 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3133 | impl Debug for crate::WhereClause { |
3134 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3135 | let mut formatter: DebugStruct<'_, '_> = formatter.debug_struct(name:"WhereClause" ); |
3136 | formatter.field(name:"where_token" , &self.where_token); |
3137 | formatter.field(name:"predicates" , &self.predicates); |
3138 | formatter.finish() |
3139 | } |
3140 | } |
3141 | #[cfg (any(feature = "derive" , feature = "full" ))] |
3142 | #[cfg_attr (doc_cfg, doc(cfg(feature = "extra-traits" )))] |
3143 | impl Debug for crate::WherePredicate { |
3144 | fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
3145 | formatter.write_str(data:"WherePredicate::" )?; |
3146 | match self { |
3147 | crate::WherePredicate::Lifetime(v0: &PredicateLifetime) => { |
3148 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Lifetime" ); |
3149 | formatter.field(v0); |
3150 | formatter.finish() |
3151 | } |
3152 | crate::WherePredicate::Type(v0: &PredicateType) => { |
3153 | let mut formatter: DebugTuple<'_, '_> = formatter.debug_tuple(name:"Type" ); |
3154 | formatter.field(v0); |
3155 | formatter.finish() |
3156 | } |
3157 | } |
3158 | } |
3159 | } |
3160 | |