| 1 |
// This file is @generated by syn-internal-codegen. |
| 2 |
// It is not intended for manual editing. |
| 3 |
|
| 4 |
#![allow(repr_transparent_non_zst_fields)] |
| 5 |
#![allow(clippy::match_wildcard_for_single_variants)] |
| 6 |
use super::{Lite, Present}; |
| 7 |
use ref_cast::RefCast; |
| 8 |
use std::fmt::{self, Debug, Display}; |
| 9 |
impl Debug for Lite<syn::Abi> { |
| 10 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 11 |
let mut formatter = formatter.debug_struct("Abi"); |
| 12 |
if let Some(val) = &self.value.name { |
| 13 |
#[derive(RefCast)] |
| 14 |
#[repr(transparent)] |
| 15 |
struct Print(syn::LitStr); |
| 16 |
impl Debug for Print { |
| 17 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 18 |
formatter.write_str("Some(")?; |
| 19 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 20 |
formatter.write_str(")")?; |
| 21 |
Ok(()) |
| 22 |
} |
| 23 |
} |
| 24 |
formatter.field("name", Print::ref_cast(val)); |
| 25 |
} |
| 26 |
formatter.finish() |
| 27 |
} |
| 28 |
} |
| 29 |
impl Debug for Lite<syn::AngleBracketedGenericArguments> { |
| 30 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 31 |
let mut formatter = formatter.debug_struct("AngleBracketedGenericArguments"); |
| 32 |
if self.value.colon2_token.is_some() { |
| 33 |
formatter.field("colon2_token", &Present); |
| 34 |
} |
| 35 |
if !self.value.args.is_empty() { |
| 36 |
formatter.field("args", Lite(&self.value.args)); |
| 37 |
} |
| 38 |
formatter.finish() |
| 39 |
} |
| 40 |
} |
| 41 |
impl Debug for Lite<syn::Arm> { |
| 42 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 43 |
let mut formatter = formatter.debug_struct("Arm"); |
| 44 |
if !self.value.attrs.is_empty() { |
| 45 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 46 |
} |
| 47 |
formatter.field("pat", Lite(&self.value.pat)); |
| 48 |
if let Some(val) = &self.value.guard { |
| 49 |
#[derive(RefCast)] |
| 50 |
#[repr(transparent)] |
| 51 |
struct Print((syn::token::If, Box<syn::Expr>)); |
| 52 |
impl Debug for Print { |
| 53 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 54 |
formatter.write_str("Some(")?; |
| 55 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 56 |
formatter.write_str(")")?; |
| 57 |
Ok(()) |
| 58 |
} |
| 59 |
} |
| 60 |
formatter.field("guard", Print::ref_cast(val)); |
| 61 |
} |
| 62 |
formatter.field("body", Lite(&self.value.body)); |
| 63 |
if self.value.comma.is_some() { |
| 64 |
formatter.field("comma", &Present); |
| 65 |
} |
| 66 |
formatter.finish() |
| 67 |
} |
| 68 |
} |
| 69 |
impl Debug for Lite<syn::AssocConst> { |
| 70 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 71 |
let mut formatter = formatter.debug_struct("AssocConst"); |
| 72 |
formatter.field("ident", Lite(&self.value.ident)); |
| 73 |
if let Some(val) = &self.value.generics { |
| 74 |
#[derive(RefCast)] |
| 75 |
#[repr(transparent)] |
| 76 |
struct Print(syn::AngleBracketedGenericArguments); |
| 77 |
impl Debug for Print { |
| 78 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 79 |
formatter.write_str("Some(")?; |
| 80 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 81 |
formatter.write_str(")")?; |
| 82 |
Ok(()) |
| 83 |
} |
| 84 |
} |
| 85 |
formatter.field("generics", Print::ref_cast(val)); |
| 86 |
} |
| 87 |
formatter.field("value", Lite(&self.value.value)); |
| 88 |
formatter.finish() |
| 89 |
} |
| 90 |
} |
| 91 |
impl Debug for Lite<syn::AssocType> { |
| 92 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 93 |
let mut formatter = formatter.debug_struct("AssocType"); |
| 94 |
formatter.field("ident", Lite(&self.value.ident)); |
| 95 |
if let Some(val) = &self.value.generics { |
| 96 |
#[derive(RefCast)] |
| 97 |
#[repr(transparent)] |
| 98 |
struct Print(syn::AngleBracketedGenericArguments); |
| 99 |
impl Debug for Print { |
| 100 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 101 |
formatter.write_str("Some(")?; |
| 102 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 103 |
formatter.write_str(")")?; |
| 104 |
Ok(()) |
| 105 |
} |
| 106 |
} |
| 107 |
formatter.field("generics", Print::ref_cast(val)); |
| 108 |
} |
| 109 |
formatter.field("ty", Lite(&self.value.ty)); |
| 110 |
formatter.finish() |
| 111 |
} |
| 112 |
} |
| 113 |
impl Debug for Lite<syn::AttrStyle> { |
| 114 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 115 |
match &self.value { |
| 116 |
syn::AttrStyle::Outer => formatter.write_str("AttrStyle::Outer"), |
| 117 |
syn::AttrStyle::Inner(_val) => { |
| 118 |
formatter.write_str("AttrStyle::Inner")?; |
| 119 |
Ok(()) |
| 120 |
} |
| 121 |
} |
| 122 |
} |
| 123 |
} |
| 124 |
impl Debug for Lite<syn::Attribute> { |
| 125 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 126 |
let mut formatter = formatter.debug_struct("Attribute"); |
| 127 |
formatter.field("style", Lite(&self.value.style)); |
| 128 |
formatter.field("meta", Lite(&self.value.meta)); |
| 129 |
formatter.finish() |
| 130 |
} |
| 131 |
} |
| 132 |
impl Debug for Lite<syn::BareFnArg> { |
| 133 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 134 |
let mut formatter = formatter.debug_struct("BareFnArg"); |
| 135 |
if !self.value.attrs.is_empty() { |
| 136 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 137 |
} |
| 138 |
if let Some(val) = &self.value.name { |
| 139 |
#[derive(RefCast)] |
| 140 |
#[repr(transparent)] |
| 141 |
struct Print((proc_macro2::Ident, syn::token::Colon)); |
| 142 |
impl Debug for Print { |
| 143 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 144 |
formatter.write_str("Some(")?; |
| 145 |
Debug::fmt(Lite(&self.0.0), formatter)?; |
| 146 |
formatter.write_str(")")?; |
| 147 |
Ok(()) |
| 148 |
} |
| 149 |
} |
| 150 |
formatter.field("name", Print::ref_cast(val)); |
| 151 |
} |
| 152 |
formatter.field("ty", Lite(&self.value.ty)); |
| 153 |
formatter.finish() |
| 154 |
} |
| 155 |
} |
| 156 |
impl Debug for Lite<syn::BareVariadic> { |
| 157 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 158 |
let mut formatter = formatter.debug_struct("BareVariadic"); |
| 159 |
if !self.value.attrs.is_empty() { |
| 160 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 161 |
} |
| 162 |
if let Some(val) = &self.value.name { |
| 163 |
#[derive(RefCast)] |
| 164 |
#[repr(transparent)] |
| 165 |
struct Print((proc_macro2::Ident, syn::token::Colon)); |
| 166 |
impl Debug for Print { |
| 167 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 168 |
formatter.write_str("Some(")?; |
| 169 |
Debug::fmt(Lite(&self.0.0), formatter)?; |
| 170 |
formatter.write_str(")")?; |
| 171 |
Ok(()) |
| 172 |
} |
| 173 |
} |
| 174 |
formatter.field("name", Print::ref_cast(val)); |
| 175 |
} |
| 176 |
if self.value.comma.is_some() { |
| 177 |
formatter.field("comma", &Present); |
| 178 |
} |
| 179 |
formatter.finish() |
| 180 |
} |
| 181 |
} |
| 182 |
impl Debug for Lite<syn::BinOp> { |
| 183 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 184 |
match &self.value { |
| 185 |
syn::BinOp::Add(_val) => { |
| 186 |
formatter.write_str("BinOp::Add")?; |
| 187 |
Ok(()) |
| 188 |
} |
| 189 |
syn::BinOp::Sub(_val) => { |
| 190 |
formatter.write_str("BinOp::Sub")?; |
| 191 |
Ok(()) |
| 192 |
} |
| 193 |
syn::BinOp::Mul(_val) => { |
| 194 |
formatter.write_str("BinOp::Mul")?; |
| 195 |
Ok(()) |
| 196 |
} |
| 197 |
syn::BinOp::Div(_val) => { |
| 198 |
formatter.write_str("BinOp::Div")?; |
| 199 |
Ok(()) |
| 200 |
} |
| 201 |
syn::BinOp::Rem(_val) => { |
| 202 |
formatter.write_str("BinOp::Rem")?; |
| 203 |
Ok(()) |
| 204 |
} |
| 205 |
syn::BinOp::And(_val) => { |
| 206 |
formatter.write_str("BinOp::And")?; |
| 207 |
Ok(()) |
| 208 |
} |
| 209 |
syn::BinOp::Or(_val) => { |
| 210 |
formatter.write_str("BinOp::Or")?; |
| 211 |
Ok(()) |
| 212 |
} |
| 213 |
syn::BinOp::BitXor(_val) => { |
| 214 |
formatter.write_str("BinOp::BitXor")?; |
| 215 |
Ok(()) |
| 216 |
} |
| 217 |
syn::BinOp::BitAnd(_val) => { |
| 218 |
formatter.write_str("BinOp::BitAnd")?; |
| 219 |
Ok(()) |
| 220 |
} |
| 221 |
syn::BinOp::BitOr(_val) => { |
| 222 |
formatter.write_str("BinOp::BitOr")?; |
| 223 |
Ok(()) |
| 224 |
} |
| 225 |
syn::BinOp::Shl(_val) => { |
| 226 |
formatter.write_str("BinOp::Shl")?; |
| 227 |
Ok(()) |
| 228 |
} |
| 229 |
syn::BinOp::Shr(_val) => { |
| 230 |
formatter.write_str("BinOp::Shr")?; |
| 231 |
Ok(()) |
| 232 |
} |
| 233 |
syn::BinOp::Eq(_val) => { |
| 234 |
formatter.write_str("BinOp::Eq")?; |
| 235 |
Ok(()) |
| 236 |
} |
| 237 |
syn::BinOp::Lt(_val) => { |
| 238 |
formatter.write_str("BinOp::Lt")?; |
| 239 |
Ok(()) |
| 240 |
} |
| 241 |
syn::BinOp::Le(_val) => { |
| 242 |
formatter.write_str("BinOp::Le")?; |
| 243 |
Ok(()) |
| 244 |
} |
| 245 |
syn::BinOp::Ne(_val) => { |
| 246 |
formatter.write_str("BinOp::Ne")?; |
| 247 |
Ok(()) |
| 248 |
} |
| 249 |
syn::BinOp::Ge(_val) => { |
| 250 |
formatter.write_str("BinOp::Ge")?; |
| 251 |
Ok(()) |
| 252 |
} |
| 253 |
syn::BinOp::Gt(_val) => { |
| 254 |
formatter.write_str("BinOp::Gt")?; |
| 255 |
Ok(()) |
| 256 |
} |
| 257 |
syn::BinOp::AddAssign(_val) => { |
| 258 |
formatter.write_str("BinOp::AddAssign")?; |
| 259 |
Ok(()) |
| 260 |
} |
| 261 |
syn::BinOp::SubAssign(_val) => { |
| 262 |
formatter.write_str("BinOp::SubAssign")?; |
| 263 |
Ok(()) |
| 264 |
} |
| 265 |
syn::BinOp::MulAssign(_val) => { |
| 266 |
formatter.write_str("BinOp::MulAssign")?; |
| 267 |
Ok(()) |
| 268 |
} |
| 269 |
syn::BinOp::DivAssign(_val) => { |
| 270 |
formatter.write_str("BinOp::DivAssign")?; |
| 271 |
Ok(()) |
| 272 |
} |
| 273 |
syn::BinOp::RemAssign(_val) => { |
| 274 |
formatter.write_str("BinOp::RemAssign")?; |
| 275 |
Ok(()) |
| 276 |
} |
| 277 |
syn::BinOp::BitXorAssign(_val) => { |
| 278 |
formatter.write_str("BinOp::BitXorAssign")?; |
| 279 |
Ok(()) |
| 280 |
} |
| 281 |
syn::BinOp::BitAndAssign(_val) => { |
| 282 |
formatter.write_str("BinOp::BitAndAssign")?; |
| 283 |
Ok(()) |
| 284 |
} |
| 285 |
syn::BinOp::BitOrAssign(_val) => { |
| 286 |
formatter.write_str("BinOp::BitOrAssign")?; |
| 287 |
Ok(()) |
| 288 |
} |
| 289 |
syn::BinOp::ShlAssign(_val) => { |
| 290 |
formatter.write_str("BinOp::ShlAssign")?; |
| 291 |
Ok(()) |
| 292 |
} |
| 293 |
syn::BinOp::ShrAssign(_val) => { |
| 294 |
formatter.write_str("BinOp::ShrAssign")?; |
| 295 |
Ok(()) |
| 296 |
} |
| 297 |
_ => unreachable!(), |
| 298 |
} |
| 299 |
} |
| 300 |
} |
| 301 |
impl Debug for Lite<syn::Block> { |
| 302 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 303 |
let mut formatter = formatter.debug_struct("Block"); |
| 304 |
formatter.field("stmts", Lite(&self.value.stmts)); |
| 305 |
formatter.finish() |
| 306 |
} |
| 307 |
} |
| 308 |
impl Debug for Lite<syn::BoundLifetimes> { |
| 309 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 310 |
let mut formatter = formatter.debug_struct("BoundLifetimes"); |
| 311 |
if !self.value.lifetimes.is_empty() { |
| 312 |
formatter.field("lifetimes", Lite(&self.value.lifetimes)); |
| 313 |
} |
| 314 |
formatter.finish() |
| 315 |
} |
| 316 |
} |
| 317 |
impl Debug for Lite<syn::CapturedParam> { |
| 318 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 319 |
match &self.value { |
| 320 |
syn::CapturedParam::Lifetime(_val) => { |
| 321 |
formatter.write_str("CapturedParam::Lifetime")?; |
| 322 |
formatter.write_str("(")?; |
| 323 |
Debug::fmt(Lite(_val), formatter)?; |
| 324 |
formatter.write_str(")")?; |
| 325 |
Ok(()) |
| 326 |
} |
| 327 |
syn::CapturedParam::Ident(_val) => { |
| 328 |
formatter.write_str("CapturedParam::Ident")?; |
| 329 |
formatter.write_str("(")?; |
| 330 |
Debug::fmt(Lite(_val), formatter)?; |
| 331 |
formatter.write_str(")")?; |
| 332 |
Ok(()) |
| 333 |
} |
| 334 |
_ => unreachable!(), |
| 335 |
} |
| 336 |
} |
| 337 |
} |
| 338 |
impl Debug for Lite<syn::ConstParam> { |
| 339 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 340 |
let mut formatter = formatter.debug_struct("ConstParam"); |
| 341 |
if !self.value.attrs.is_empty() { |
| 342 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 343 |
} |
| 344 |
formatter.field("ident", Lite(&self.value.ident)); |
| 345 |
formatter.field("ty", Lite(&self.value.ty)); |
| 346 |
if self.value.eq_token.is_some() { |
| 347 |
formatter.field("eq_token", &Present); |
| 348 |
} |
| 349 |
if let Some(val) = &self.value.default { |
| 350 |
#[derive(RefCast)] |
| 351 |
#[repr(transparent)] |
| 352 |
struct Print(syn::Expr); |
| 353 |
impl Debug for Print { |
| 354 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 355 |
formatter.write_str("Some(")?; |
| 356 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 357 |
formatter.write_str(")")?; |
| 358 |
Ok(()) |
| 359 |
} |
| 360 |
} |
| 361 |
formatter.field("default", Print::ref_cast(val)); |
| 362 |
} |
| 363 |
formatter.finish() |
| 364 |
} |
| 365 |
} |
| 366 |
impl Debug for Lite<syn::Constraint> { |
| 367 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 368 |
let mut formatter = formatter.debug_struct("Constraint"); |
| 369 |
formatter.field("ident", Lite(&self.value.ident)); |
| 370 |
if let Some(val) = &self.value.generics { |
| 371 |
#[derive(RefCast)] |
| 372 |
#[repr(transparent)] |
| 373 |
struct Print(syn::AngleBracketedGenericArguments); |
| 374 |
impl Debug for Print { |
| 375 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 376 |
formatter.write_str("Some(")?; |
| 377 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 378 |
formatter.write_str(")")?; |
| 379 |
Ok(()) |
| 380 |
} |
| 381 |
} |
| 382 |
formatter.field("generics", Print::ref_cast(val)); |
| 383 |
} |
| 384 |
if !self.value.bounds.is_empty() { |
| 385 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 386 |
} |
| 387 |
formatter.finish() |
| 388 |
} |
| 389 |
} |
| 390 |
impl Debug for Lite<syn::Data> { |
| 391 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 392 |
match &self.value { |
| 393 |
syn::Data::Struct(_val) => { |
| 394 |
let mut formatter = formatter.debug_struct("Data::Struct"); |
| 395 |
formatter.field("fields", Lite(&_val.fields)); |
| 396 |
if _val.semi_token.is_some() { |
| 397 |
formatter.field("semi_token", &Present); |
| 398 |
} |
| 399 |
formatter.finish() |
| 400 |
} |
| 401 |
syn::Data::Enum(_val) => { |
| 402 |
let mut formatter = formatter.debug_struct("Data::Enum"); |
| 403 |
if !_val.variants.is_empty() { |
| 404 |
formatter.field("variants", Lite(&_val.variants)); |
| 405 |
} |
| 406 |
formatter.finish() |
| 407 |
} |
| 408 |
syn::Data::Union(_val) => { |
| 409 |
let mut formatter = formatter.debug_struct("Data::Union"); |
| 410 |
formatter.field("fields", Lite(&_val.fields)); |
| 411 |
formatter.finish() |
| 412 |
} |
| 413 |
} |
| 414 |
} |
| 415 |
} |
| 416 |
impl Debug for Lite<syn::DataEnum> { |
| 417 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 418 |
let mut formatter = formatter.debug_struct("DataEnum"); |
| 419 |
if !self.value.variants.is_empty() { |
| 420 |
formatter.field("variants", Lite(&self.value.variants)); |
| 421 |
} |
| 422 |
formatter.finish() |
| 423 |
} |
| 424 |
} |
| 425 |
impl Debug for Lite<syn::DataStruct> { |
| 426 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 427 |
let mut formatter = formatter.debug_struct("DataStruct"); |
| 428 |
formatter.field("fields", Lite(&self.value.fields)); |
| 429 |
if self.value.semi_token.is_some() { |
| 430 |
formatter.field("semi_token", &Present); |
| 431 |
} |
| 432 |
formatter.finish() |
| 433 |
} |
| 434 |
} |
| 435 |
impl Debug for Lite<syn::DataUnion> { |
| 436 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 437 |
let mut formatter = formatter.debug_struct("DataUnion"); |
| 438 |
formatter.field("fields", Lite(&self.value.fields)); |
| 439 |
formatter.finish() |
| 440 |
} |
| 441 |
} |
| 442 |
impl Debug for Lite<syn::DeriveInput> { |
| 443 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 444 |
let mut formatter = formatter.debug_struct("DeriveInput"); |
| 445 |
if !self.value.attrs.is_empty() { |
| 446 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 447 |
} |
| 448 |
formatter.field("vis", Lite(&self.value.vis)); |
| 449 |
formatter.field("ident", Lite(&self.value.ident)); |
| 450 |
formatter.field("generics", Lite(&self.value.generics)); |
| 451 |
formatter.field("data", Lite(&self.value.data)); |
| 452 |
formatter.finish() |
| 453 |
} |
| 454 |
} |
| 455 |
impl Debug for Lite<syn::Expr> { |
| 456 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 457 |
match &self.value { |
| 458 |
syn::Expr::Array(_val) => { |
| 459 |
let mut formatter = formatter.debug_struct("Expr::Array"); |
| 460 |
if !_val.attrs.is_empty() { |
| 461 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 462 |
} |
| 463 |
if !_val.elems.is_empty() { |
| 464 |
formatter.field("elems", Lite(&_val.elems)); |
| 465 |
} |
| 466 |
formatter.finish() |
| 467 |
} |
| 468 |
syn::Expr::Assign(_val) => { |
| 469 |
let mut formatter = formatter.debug_struct("Expr::Assign"); |
| 470 |
if !_val.attrs.is_empty() { |
| 471 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 472 |
} |
| 473 |
formatter.field("left", Lite(&_val.left)); |
| 474 |
formatter.field("right", Lite(&_val.right)); |
| 475 |
formatter.finish() |
| 476 |
} |
| 477 |
syn::Expr::Async(_val) => { |
| 478 |
let mut formatter = formatter.debug_struct("Expr::Async"); |
| 479 |
if !_val.attrs.is_empty() { |
| 480 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 481 |
} |
| 482 |
if _val.capture.is_some() { |
| 483 |
formatter.field("capture", &Present); |
| 484 |
} |
| 485 |
formatter.field("block", Lite(&_val.block)); |
| 486 |
formatter.finish() |
| 487 |
} |
| 488 |
syn::Expr::Await(_val) => { |
| 489 |
let mut formatter = formatter.debug_struct("Expr::Await"); |
| 490 |
if !_val.attrs.is_empty() { |
| 491 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 492 |
} |
| 493 |
formatter.field("base", Lite(&_val.base)); |
| 494 |
formatter.finish() |
| 495 |
} |
| 496 |
syn::Expr::Binary(_val) => { |
| 497 |
let mut formatter = formatter.debug_struct("Expr::Binary"); |
| 498 |
if !_val.attrs.is_empty() { |
| 499 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 500 |
} |
| 501 |
formatter.field("left", Lite(&_val.left)); |
| 502 |
formatter.field("op", Lite(&_val.op)); |
| 503 |
formatter.field("right", Lite(&_val.right)); |
| 504 |
formatter.finish() |
| 505 |
} |
| 506 |
syn::Expr::Block(_val) => { |
| 507 |
let mut formatter = formatter.debug_struct("Expr::Block"); |
| 508 |
if !_val.attrs.is_empty() { |
| 509 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 510 |
} |
| 511 |
if let Some(val) = &_val.label { |
| 512 |
#[derive(RefCast)] |
| 513 |
#[repr(transparent)] |
| 514 |
struct Print(syn::Label); |
| 515 |
impl Debug for Print { |
| 516 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 517 |
formatter.write_str("Some(")?; |
| 518 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 519 |
formatter.write_str(")")?; |
| 520 |
Ok(()) |
| 521 |
} |
| 522 |
} |
| 523 |
formatter.field("label", Print::ref_cast(val)); |
| 524 |
} |
| 525 |
formatter.field("block", Lite(&_val.block)); |
| 526 |
formatter.finish() |
| 527 |
} |
| 528 |
syn::Expr::Break(_val) => { |
| 529 |
let mut formatter = formatter.debug_struct("Expr::Break"); |
| 530 |
if !_val.attrs.is_empty() { |
| 531 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 532 |
} |
| 533 |
if let Some(val) = &_val.label { |
| 534 |
#[derive(RefCast)] |
| 535 |
#[repr(transparent)] |
| 536 |
struct Print(syn::Lifetime); |
| 537 |
impl Debug for Print { |
| 538 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 539 |
formatter.write_str("Some(")?; |
| 540 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 541 |
formatter.write_str(")")?; |
| 542 |
Ok(()) |
| 543 |
} |
| 544 |
} |
| 545 |
formatter.field("label", Print::ref_cast(val)); |
| 546 |
} |
| 547 |
if let Some(val) = &_val.expr { |
| 548 |
#[derive(RefCast)] |
| 549 |
#[repr(transparent)] |
| 550 |
struct Print(Box<syn::Expr>); |
| 551 |
impl Debug for Print { |
| 552 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 553 |
formatter.write_str("Some(")?; |
| 554 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 555 |
formatter.write_str(")")?; |
| 556 |
Ok(()) |
| 557 |
} |
| 558 |
} |
| 559 |
formatter.field("expr", Print::ref_cast(val)); |
| 560 |
} |
| 561 |
formatter.finish() |
| 562 |
} |
| 563 |
syn::Expr::Call(_val) => { |
| 564 |
let mut formatter = formatter.debug_struct("Expr::Call"); |
| 565 |
if !_val.attrs.is_empty() { |
| 566 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 567 |
} |
| 568 |
formatter.field("func", Lite(&_val.func)); |
| 569 |
if !_val.args.is_empty() { |
| 570 |
formatter.field("args", Lite(&_val.args)); |
| 571 |
} |
| 572 |
formatter.finish() |
| 573 |
} |
| 574 |
syn::Expr::Cast(_val) => { |
| 575 |
let mut formatter = formatter.debug_struct("Expr::Cast"); |
| 576 |
if !_val.attrs.is_empty() { |
| 577 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 578 |
} |
| 579 |
formatter.field("expr", Lite(&_val.expr)); |
| 580 |
formatter.field("ty", Lite(&_val.ty)); |
| 581 |
formatter.finish() |
| 582 |
} |
| 583 |
syn::Expr::Closure(_val) => { |
| 584 |
let mut formatter = formatter.debug_struct("Expr::Closure"); |
| 585 |
if !_val.attrs.is_empty() { |
| 586 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 587 |
} |
| 588 |
if let Some(val) = &_val.lifetimes { |
| 589 |
#[derive(RefCast)] |
| 590 |
#[repr(transparent)] |
| 591 |
struct Print(syn::BoundLifetimes); |
| 592 |
impl Debug for Print { |
| 593 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 594 |
formatter.write_str("Some(")?; |
| 595 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 596 |
formatter.write_str(")")?; |
| 597 |
Ok(()) |
| 598 |
} |
| 599 |
} |
| 600 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 601 |
} |
| 602 |
if _val.constness.is_some() { |
| 603 |
formatter.field("constness", &Present); |
| 604 |
} |
| 605 |
if _val.movability.is_some() { |
| 606 |
formatter.field("movability", &Present); |
| 607 |
} |
| 608 |
if _val.asyncness.is_some() { |
| 609 |
formatter.field("asyncness", &Present); |
| 610 |
} |
| 611 |
if _val.capture.is_some() { |
| 612 |
formatter.field("capture", &Present); |
| 613 |
} |
| 614 |
if !_val.inputs.is_empty() { |
| 615 |
formatter.field("inputs", Lite(&_val.inputs)); |
| 616 |
} |
| 617 |
formatter.field("output", Lite(&_val.output)); |
| 618 |
formatter.field("body", Lite(&_val.body)); |
| 619 |
formatter.finish() |
| 620 |
} |
| 621 |
syn::Expr::Const(_val) => { |
| 622 |
let mut formatter = formatter.debug_struct("Expr::Const"); |
| 623 |
if !_val.attrs.is_empty() { |
| 624 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 625 |
} |
| 626 |
formatter.field("block", Lite(&_val.block)); |
| 627 |
formatter.finish() |
| 628 |
} |
| 629 |
syn::Expr::Continue(_val) => { |
| 630 |
let mut formatter = formatter.debug_struct("Expr::Continue"); |
| 631 |
if !_val.attrs.is_empty() { |
| 632 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 633 |
} |
| 634 |
if let Some(val) = &_val.label { |
| 635 |
#[derive(RefCast)] |
| 636 |
#[repr(transparent)] |
| 637 |
struct Print(syn::Lifetime); |
| 638 |
impl Debug for Print { |
| 639 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 640 |
formatter.write_str("Some(")?; |
| 641 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 642 |
formatter.write_str(")")?; |
| 643 |
Ok(()) |
| 644 |
} |
| 645 |
} |
| 646 |
formatter.field("label", Print::ref_cast(val)); |
| 647 |
} |
| 648 |
formatter.finish() |
| 649 |
} |
| 650 |
syn::Expr::Field(_val) => { |
| 651 |
let mut formatter = formatter.debug_struct("Expr::Field"); |
| 652 |
if !_val.attrs.is_empty() { |
| 653 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 654 |
} |
| 655 |
formatter.field("base", Lite(&_val.base)); |
| 656 |
formatter.field("member", Lite(&_val.member)); |
| 657 |
formatter.finish() |
| 658 |
} |
| 659 |
syn::Expr::ForLoop(_val) => { |
| 660 |
let mut formatter = formatter.debug_struct("Expr::ForLoop"); |
| 661 |
if !_val.attrs.is_empty() { |
| 662 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 663 |
} |
| 664 |
if let Some(val) = &_val.label { |
| 665 |
#[derive(RefCast)] |
| 666 |
#[repr(transparent)] |
| 667 |
struct Print(syn::Label); |
| 668 |
impl Debug for Print { |
| 669 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 670 |
formatter.write_str("Some(")?; |
| 671 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 672 |
formatter.write_str(")")?; |
| 673 |
Ok(()) |
| 674 |
} |
| 675 |
} |
| 676 |
formatter.field("label", Print::ref_cast(val)); |
| 677 |
} |
| 678 |
formatter.field("pat", Lite(&_val.pat)); |
| 679 |
formatter.field("expr", Lite(&_val.expr)); |
| 680 |
formatter.field("body", Lite(&_val.body)); |
| 681 |
formatter.finish() |
| 682 |
} |
| 683 |
syn::Expr::Group(_val) => { |
| 684 |
let mut formatter = formatter.debug_struct("Expr::Group"); |
| 685 |
if !_val.attrs.is_empty() { |
| 686 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 687 |
} |
| 688 |
formatter.field("expr", Lite(&_val.expr)); |
| 689 |
formatter.finish() |
| 690 |
} |
| 691 |
syn::Expr::If(_val) => { |
| 692 |
let mut formatter = formatter.debug_struct("Expr::If"); |
| 693 |
if !_val.attrs.is_empty() { |
| 694 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 695 |
} |
| 696 |
formatter.field("cond", Lite(&_val.cond)); |
| 697 |
formatter.field("then_branch", Lite(&_val.then_branch)); |
| 698 |
if let Some(val) = &_val.else_branch { |
| 699 |
#[derive(RefCast)] |
| 700 |
#[repr(transparent)] |
| 701 |
struct Print((syn::token::Else, Box<syn::Expr>)); |
| 702 |
impl Debug for Print { |
| 703 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 704 |
formatter.write_str("Some(")?; |
| 705 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 706 |
formatter.write_str(")")?; |
| 707 |
Ok(()) |
| 708 |
} |
| 709 |
} |
| 710 |
formatter.field("else_branch", Print::ref_cast(val)); |
| 711 |
} |
| 712 |
formatter.finish() |
| 713 |
} |
| 714 |
syn::Expr::Index(_val) => { |
| 715 |
let mut formatter = formatter.debug_struct("Expr::Index"); |
| 716 |
if !_val.attrs.is_empty() { |
| 717 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 718 |
} |
| 719 |
formatter.field("expr", Lite(&_val.expr)); |
| 720 |
formatter.field("index", Lite(&_val.index)); |
| 721 |
formatter.finish() |
| 722 |
} |
| 723 |
syn::Expr::Infer(_val) => { |
| 724 |
let mut formatter = formatter.debug_struct("Expr::Infer"); |
| 725 |
if !_val.attrs.is_empty() { |
| 726 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 727 |
} |
| 728 |
formatter.finish() |
| 729 |
} |
| 730 |
syn::Expr::Let(_val) => { |
| 731 |
let mut formatter = formatter.debug_struct("Expr::Let"); |
| 732 |
if !_val.attrs.is_empty() { |
| 733 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 734 |
} |
| 735 |
formatter.field("pat", Lite(&_val.pat)); |
| 736 |
formatter.field("expr", Lite(&_val.expr)); |
| 737 |
formatter.finish() |
| 738 |
} |
| 739 |
syn::Expr::Lit(_val) => { |
| 740 |
let mut formatter = formatter.debug_struct("Expr::Lit"); |
| 741 |
if !_val.attrs.is_empty() { |
| 742 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 743 |
} |
| 744 |
formatter.field("lit", Lite(&_val.lit)); |
| 745 |
formatter.finish() |
| 746 |
} |
| 747 |
syn::Expr::Loop(_val) => { |
| 748 |
let mut formatter = formatter.debug_struct("Expr::Loop"); |
| 749 |
if !_val.attrs.is_empty() { |
| 750 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 751 |
} |
| 752 |
if let Some(val) = &_val.label { |
| 753 |
#[derive(RefCast)] |
| 754 |
#[repr(transparent)] |
| 755 |
struct Print(syn::Label); |
| 756 |
impl Debug for Print { |
| 757 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 758 |
formatter.write_str("Some(")?; |
| 759 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 760 |
formatter.write_str(")")?; |
| 761 |
Ok(()) |
| 762 |
} |
| 763 |
} |
| 764 |
formatter.field("label", Print::ref_cast(val)); |
| 765 |
} |
| 766 |
formatter.field("body", Lite(&_val.body)); |
| 767 |
formatter.finish() |
| 768 |
} |
| 769 |
syn::Expr::Macro(_val) => { |
| 770 |
let mut formatter = formatter.debug_struct("Expr::Macro"); |
| 771 |
if !_val.attrs.is_empty() { |
| 772 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 773 |
} |
| 774 |
formatter.field("mac", Lite(&_val.mac)); |
| 775 |
formatter.finish() |
| 776 |
} |
| 777 |
syn::Expr::Match(_val) => { |
| 778 |
let mut formatter = formatter.debug_struct("Expr::Match"); |
| 779 |
if !_val.attrs.is_empty() { |
| 780 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 781 |
} |
| 782 |
formatter.field("expr", Lite(&_val.expr)); |
| 783 |
if !_val.arms.is_empty() { |
| 784 |
formatter.field("arms", Lite(&_val.arms)); |
| 785 |
} |
| 786 |
formatter.finish() |
| 787 |
} |
| 788 |
syn::Expr::MethodCall(_val) => { |
| 789 |
let mut formatter = formatter.debug_struct("Expr::MethodCall"); |
| 790 |
if !_val.attrs.is_empty() { |
| 791 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 792 |
} |
| 793 |
formatter.field("receiver", Lite(&_val.receiver)); |
| 794 |
formatter.field("method", Lite(&_val.method)); |
| 795 |
if let Some(val) = &_val.turbofish { |
| 796 |
#[derive(RefCast)] |
| 797 |
#[repr(transparent)] |
| 798 |
struct Print(syn::AngleBracketedGenericArguments); |
| 799 |
impl Debug for Print { |
| 800 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 801 |
formatter.write_str("Some(")?; |
| 802 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 803 |
formatter.write_str(")")?; |
| 804 |
Ok(()) |
| 805 |
} |
| 806 |
} |
| 807 |
formatter.field("turbofish", Print::ref_cast(val)); |
| 808 |
} |
| 809 |
if !_val.args.is_empty() { |
| 810 |
formatter.field("args", Lite(&_val.args)); |
| 811 |
} |
| 812 |
formatter.finish() |
| 813 |
} |
| 814 |
syn::Expr::Paren(_val) => { |
| 815 |
let mut formatter = formatter.debug_struct("Expr::Paren"); |
| 816 |
if !_val.attrs.is_empty() { |
| 817 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 818 |
} |
| 819 |
formatter.field("expr", Lite(&_val.expr)); |
| 820 |
formatter.finish() |
| 821 |
} |
| 822 |
syn::Expr::Path(_val) => { |
| 823 |
let mut formatter = formatter.debug_struct("Expr::Path"); |
| 824 |
if !_val.attrs.is_empty() { |
| 825 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 826 |
} |
| 827 |
if let Some(val) = &_val.qself { |
| 828 |
#[derive(RefCast)] |
| 829 |
#[repr(transparent)] |
| 830 |
struct Print(syn::QSelf); |
| 831 |
impl Debug for Print { |
| 832 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 833 |
formatter.write_str("Some(")?; |
| 834 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 835 |
formatter.write_str(")")?; |
| 836 |
Ok(()) |
| 837 |
} |
| 838 |
} |
| 839 |
formatter.field("qself", Print::ref_cast(val)); |
| 840 |
} |
| 841 |
formatter.field("path", Lite(&_val.path)); |
| 842 |
formatter.finish() |
| 843 |
} |
| 844 |
syn::Expr::Range(_val) => { |
| 845 |
let mut formatter = formatter.debug_struct("Expr::Range"); |
| 846 |
if !_val.attrs.is_empty() { |
| 847 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 848 |
} |
| 849 |
if let Some(val) = &_val.start { |
| 850 |
#[derive(RefCast)] |
| 851 |
#[repr(transparent)] |
| 852 |
struct Print(Box<syn::Expr>); |
| 853 |
impl Debug for Print { |
| 854 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 855 |
formatter.write_str("Some(")?; |
| 856 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 857 |
formatter.write_str(")")?; |
| 858 |
Ok(()) |
| 859 |
} |
| 860 |
} |
| 861 |
formatter.field("start", Print::ref_cast(val)); |
| 862 |
} |
| 863 |
formatter.field("limits", Lite(&_val.limits)); |
| 864 |
if let Some(val) = &_val.end { |
| 865 |
#[derive(RefCast)] |
| 866 |
#[repr(transparent)] |
| 867 |
struct Print(Box<syn::Expr>); |
| 868 |
impl Debug for Print { |
| 869 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 870 |
formatter.write_str("Some(")?; |
| 871 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 872 |
formatter.write_str(")")?; |
| 873 |
Ok(()) |
| 874 |
} |
| 875 |
} |
| 876 |
formatter.field("end", Print::ref_cast(val)); |
| 877 |
} |
| 878 |
formatter.finish() |
| 879 |
} |
| 880 |
syn::Expr::RawAddr(_val) => { |
| 881 |
let mut formatter = formatter.debug_struct("Expr::RawAddr"); |
| 882 |
if !_val.attrs.is_empty() { |
| 883 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 884 |
} |
| 885 |
formatter.field("mutability", Lite(&_val.mutability)); |
| 886 |
formatter.field("expr", Lite(&_val.expr)); |
| 887 |
formatter.finish() |
| 888 |
} |
| 889 |
syn::Expr::Reference(_val) => { |
| 890 |
let mut formatter = formatter.debug_struct("Expr::Reference"); |
| 891 |
if !_val.attrs.is_empty() { |
| 892 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 893 |
} |
| 894 |
if _val.mutability.is_some() { |
| 895 |
formatter.field("mutability", &Present); |
| 896 |
} |
| 897 |
formatter.field("expr", Lite(&_val.expr)); |
| 898 |
formatter.finish() |
| 899 |
} |
| 900 |
syn::Expr::Repeat(_val) => { |
| 901 |
let mut formatter = formatter.debug_struct("Expr::Repeat"); |
| 902 |
if !_val.attrs.is_empty() { |
| 903 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 904 |
} |
| 905 |
formatter.field("expr", Lite(&_val.expr)); |
| 906 |
formatter.field("len", Lite(&_val.len)); |
| 907 |
formatter.finish() |
| 908 |
} |
| 909 |
syn::Expr::Return(_val) => { |
| 910 |
let mut formatter = formatter.debug_struct("Expr::Return"); |
| 911 |
if !_val.attrs.is_empty() { |
| 912 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 913 |
} |
| 914 |
if let Some(val) = &_val.expr { |
| 915 |
#[derive(RefCast)] |
| 916 |
#[repr(transparent)] |
| 917 |
struct Print(Box<syn::Expr>); |
| 918 |
impl Debug for Print { |
| 919 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 920 |
formatter.write_str("Some(")?; |
| 921 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 922 |
formatter.write_str(")")?; |
| 923 |
Ok(()) |
| 924 |
} |
| 925 |
} |
| 926 |
formatter.field("expr", Print::ref_cast(val)); |
| 927 |
} |
| 928 |
formatter.finish() |
| 929 |
} |
| 930 |
syn::Expr::Struct(_val) => { |
| 931 |
let mut formatter = formatter.debug_struct("Expr::Struct"); |
| 932 |
if !_val.attrs.is_empty() { |
| 933 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 934 |
} |
| 935 |
if let Some(val) = &_val.qself { |
| 936 |
#[derive(RefCast)] |
| 937 |
#[repr(transparent)] |
| 938 |
struct Print(syn::QSelf); |
| 939 |
impl Debug for Print { |
| 940 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 941 |
formatter.write_str("Some(")?; |
| 942 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 943 |
formatter.write_str(")")?; |
| 944 |
Ok(()) |
| 945 |
} |
| 946 |
} |
| 947 |
formatter.field("qself", Print::ref_cast(val)); |
| 948 |
} |
| 949 |
formatter.field("path", Lite(&_val.path)); |
| 950 |
if !_val.fields.is_empty() { |
| 951 |
formatter.field("fields", Lite(&_val.fields)); |
| 952 |
} |
| 953 |
if _val.dot2_token.is_some() { |
| 954 |
formatter.field("dot2_token", &Present); |
| 955 |
} |
| 956 |
if let Some(val) = &_val.rest { |
| 957 |
#[derive(RefCast)] |
| 958 |
#[repr(transparent)] |
| 959 |
struct Print(Box<syn::Expr>); |
| 960 |
impl Debug for Print { |
| 961 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 962 |
formatter.write_str("Some(")?; |
| 963 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 964 |
formatter.write_str(")")?; |
| 965 |
Ok(()) |
| 966 |
} |
| 967 |
} |
| 968 |
formatter.field("rest", Print::ref_cast(val)); |
| 969 |
} |
| 970 |
formatter.finish() |
| 971 |
} |
| 972 |
syn::Expr::Try(_val) => { |
| 973 |
let mut formatter = formatter.debug_struct("Expr::Try"); |
| 974 |
if !_val.attrs.is_empty() { |
| 975 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 976 |
} |
| 977 |
formatter.field("expr", Lite(&_val.expr)); |
| 978 |
formatter.finish() |
| 979 |
} |
| 980 |
syn::Expr::TryBlock(_val) => { |
| 981 |
let mut formatter = formatter.debug_struct("Expr::TryBlock"); |
| 982 |
if !_val.attrs.is_empty() { |
| 983 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 984 |
} |
| 985 |
formatter.field("block", Lite(&_val.block)); |
| 986 |
formatter.finish() |
| 987 |
} |
| 988 |
syn::Expr::Tuple(_val) => { |
| 989 |
let mut formatter = formatter.debug_struct("Expr::Tuple"); |
| 990 |
if !_val.attrs.is_empty() { |
| 991 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 992 |
} |
| 993 |
if !_val.elems.is_empty() { |
| 994 |
formatter.field("elems", Lite(&_val.elems)); |
| 995 |
} |
| 996 |
formatter.finish() |
| 997 |
} |
| 998 |
syn::Expr::Unary(_val) => { |
| 999 |
let mut formatter = formatter.debug_struct("Expr::Unary"); |
| 1000 |
if !_val.attrs.is_empty() { |
| 1001 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1002 |
} |
| 1003 |
formatter.field("op", Lite(&_val.op)); |
| 1004 |
formatter.field("expr", Lite(&_val.expr)); |
| 1005 |
formatter.finish() |
| 1006 |
} |
| 1007 |
syn::Expr::Unsafe(_val) => { |
| 1008 |
let mut formatter = formatter.debug_struct("Expr::Unsafe"); |
| 1009 |
if !_val.attrs.is_empty() { |
| 1010 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1011 |
} |
| 1012 |
formatter.field("block", Lite(&_val.block)); |
| 1013 |
formatter.finish() |
| 1014 |
} |
| 1015 |
syn::Expr::Verbatim(_val) => { |
| 1016 |
formatter.write_str("Expr::Verbatim")?; |
| 1017 |
formatter.write_str("(`")?; |
| 1018 |
Display::fmt(_val, formatter)?; |
| 1019 |
formatter.write_str("`)")?; |
| 1020 |
Ok(()) |
| 1021 |
} |
| 1022 |
syn::Expr::While(_val) => { |
| 1023 |
let mut formatter = formatter.debug_struct("Expr::While"); |
| 1024 |
if !_val.attrs.is_empty() { |
| 1025 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1026 |
} |
| 1027 |
if let Some(val) = &_val.label { |
| 1028 |
#[derive(RefCast)] |
| 1029 |
#[repr(transparent)] |
| 1030 |
struct Print(syn::Label); |
| 1031 |
impl Debug for Print { |
| 1032 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1033 |
formatter.write_str("Some(")?; |
| 1034 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1035 |
formatter.write_str(")")?; |
| 1036 |
Ok(()) |
| 1037 |
} |
| 1038 |
} |
| 1039 |
formatter.field("label", Print::ref_cast(val)); |
| 1040 |
} |
| 1041 |
formatter.field("cond", Lite(&_val.cond)); |
| 1042 |
formatter.field("body", Lite(&_val.body)); |
| 1043 |
formatter.finish() |
| 1044 |
} |
| 1045 |
syn::Expr::Yield(_val) => { |
| 1046 |
let mut formatter = formatter.debug_struct("Expr::Yield"); |
| 1047 |
if !_val.attrs.is_empty() { |
| 1048 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1049 |
} |
| 1050 |
if let Some(val) = &_val.expr { |
| 1051 |
#[derive(RefCast)] |
| 1052 |
#[repr(transparent)] |
| 1053 |
struct Print(Box<syn::Expr>); |
| 1054 |
impl Debug for Print { |
| 1055 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1056 |
formatter.write_str("Some(")?; |
| 1057 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1058 |
formatter.write_str(")")?; |
| 1059 |
Ok(()) |
| 1060 |
} |
| 1061 |
} |
| 1062 |
formatter.field("expr", Print::ref_cast(val)); |
| 1063 |
} |
| 1064 |
formatter.finish() |
| 1065 |
} |
| 1066 |
_ => unreachable!(), |
| 1067 |
} |
| 1068 |
} |
| 1069 |
} |
| 1070 |
impl Debug for Lite<syn::ExprArray> { |
| 1071 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1072 |
let mut formatter = formatter.debug_struct("ExprArray"); |
| 1073 |
if !self.value.attrs.is_empty() { |
| 1074 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1075 |
} |
| 1076 |
if !self.value.elems.is_empty() { |
| 1077 |
formatter.field("elems", Lite(&self.value.elems)); |
| 1078 |
} |
| 1079 |
formatter.finish() |
| 1080 |
} |
| 1081 |
} |
| 1082 |
impl Debug for Lite<syn::ExprAssign> { |
| 1083 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1084 |
let mut formatter = formatter.debug_struct("ExprAssign"); |
| 1085 |
if !self.value.attrs.is_empty() { |
| 1086 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1087 |
} |
| 1088 |
formatter.field("left", Lite(&self.value.left)); |
| 1089 |
formatter.field("right", Lite(&self.value.right)); |
| 1090 |
formatter.finish() |
| 1091 |
} |
| 1092 |
} |
| 1093 |
impl Debug for Lite<syn::ExprAsync> { |
| 1094 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1095 |
let mut formatter = formatter.debug_struct("ExprAsync"); |
| 1096 |
if !self.value.attrs.is_empty() { |
| 1097 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1098 |
} |
| 1099 |
if self.value.capture.is_some() { |
| 1100 |
formatter.field("capture", &Present); |
| 1101 |
} |
| 1102 |
formatter.field("block", Lite(&self.value.block)); |
| 1103 |
formatter.finish() |
| 1104 |
} |
| 1105 |
} |
| 1106 |
impl Debug for Lite<syn::ExprAwait> { |
| 1107 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1108 |
let mut formatter = formatter.debug_struct("ExprAwait"); |
| 1109 |
if !self.value.attrs.is_empty() { |
| 1110 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1111 |
} |
| 1112 |
formatter.field("base", Lite(&self.value.base)); |
| 1113 |
formatter.finish() |
| 1114 |
} |
| 1115 |
} |
| 1116 |
impl Debug for Lite<syn::ExprBinary> { |
| 1117 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1118 |
let mut formatter = formatter.debug_struct("ExprBinary"); |
| 1119 |
if !self.value.attrs.is_empty() { |
| 1120 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1121 |
} |
| 1122 |
formatter.field("left", Lite(&self.value.left)); |
| 1123 |
formatter.field("op", Lite(&self.value.op)); |
| 1124 |
formatter.field("right", Lite(&self.value.right)); |
| 1125 |
formatter.finish() |
| 1126 |
} |
| 1127 |
} |
| 1128 |
impl Debug for Lite<syn::ExprBlock> { |
| 1129 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1130 |
let mut formatter = formatter.debug_struct("ExprBlock"); |
| 1131 |
if !self.value.attrs.is_empty() { |
| 1132 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1133 |
} |
| 1134 |
if let Some(val) = &self.value.label { |
| 1135 |
#[derive(RefCast)] |
| 1136 |
#[repr(transparent)] |
| 1137 |
struct Print(syn::Label); |
| 1138 |
impl Debug for Print { |
| 1139 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1140 |
formatter.write_str("Some(")?; |
| 1141 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1142 |
formatter.write_str(")")?; |
| 1143 |
Ok(()) |
| 1144 |
} |
| 1145 |
} |
| 1146 |
formatter.field("label", Print::ref_cast(val)); |
| 1147 |
} |
| 1148 |
formatter.field("block", Lite(&self.value.block)); |
| 1149 |
formatter.finish() |
| 1150 |
} |
| 1151 |
} |
| 1152 |
impl Debug for Lite<syn::ExprBreak> { |
| 1153 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1154 |
let mut formatter = formatter.debug_struct("ExprBreak"); |
| 1155 |
if !self.value.attrs.is_empty() { |
| 1156 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1157 |
} |
| 1158 |
if let Some(val) = &self.value.label { |
| 1159 |
#[derive(RefCast)] |
| 1160 |
#[repr(transparent)] |
| 1161 |
struct Print(syn::Lifetime); |
| 1162 |
impl Debug for Print { |
| 1163 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1164 |
formatter.write_str("Some(")?; |
| 1165 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1166 |
formatter.write_str(")")?; |
| 1167 |
Ok(()) |
| 1168 |
} |
| 1169 |
} |
| 1170 |
formatter.field("label", Print::ref_cast(val)); |
| 1171 |
} |
| 1172 |
if let Some(val) = &self.value.expr { |
| 1173 |
#[derive(RefCast)] |
| 1174 |
#[repr(transparent)] |
| 1175 |
struct Print(Box<syn::Expr>); |
| 1176 |
impl Debug for Print { |
| 1177 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1178 |
formatter.write_str("Some(")?; |
| 1179 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1180 |
formatter.write_str(")")?; |
| 1181 |
Ok(()) |
| 1182 |
} |
| 1183 |
} |
| 1184 |
formatter.field("expr", Print::ref_cast(val)); |
| 1185 |
} |
| 1186 |
formatter.finish() |
| 1187 |
} |
| 1188 |
} |
| 1189 |
impl Debug for Lite<syn::ExprCall> { |
| 1190 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1191 |
let mut formatter = formatter.debug_struct("ExprCall"); |
| 1192 |
if !self.value.attrs.is_empty() { |
| 1193 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1194 |
} |
| 1195 |
formatter.field("func", Lite(&self.value.func)); |
| 1196 |
if !self.value.args.is_empty() { |
| 1197 |
formatter.field("args", Lite(&self.value.args)); |
| 1198 |
} |
| 1199 |
formatter.finish() |
| 1200 |
} |
| 1201 |
} |
| 1202 |
impl Debug for Lite<syn::ExprCast> { |
| 1203 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1204 |
let mut formatter = formatter.debug_struct("ExprCast"); |
| 1205 |
if !self.value.attrs.is_empty() { |
| 1206 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1207 |
} |
| 1208 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1209 |
formatter.field("ty", Lite(&self.value.ty)); |
| 1210 |
formatter.finish() |
| 1211 |
} |
| 1212 |
} |
| 1213 |
impl Debug for Lite<syn::ExprClosure> { |
| 1214 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1215 |
let mut formatter = formatter.debug_struct("ExprClosure"); |
| 1216 |
if !self.value.attrs.is_empty() { |
| 1217 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1218 |
} |
| 1219 |
if let Some(val) = &self.value.lifetimes { |
| 1220 |
#[derive(RefCast)] |
| 1221 |
#[repr(transparent)] |
| 1222 |
struct Print(syn::BoundLifetimes); |
| 1223 |
impl Debug for Print { |
| 1224 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1225 |
formatter.write_str("Some(")?; |
| 1226 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1227 |
formatter.write_str(")")?; |
| 1228 |
Ok(()) |
| 1229 |
} |
| 1230 |
} |
| 1231 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 1232 |
} |
| 1233 |
if self.value.constness.is_some() { |
| 1234 |
formatter.field("constness", &Present); |
| 1235 |
} |
| 1236 |
if self.value.movability.is_some() { |
| 1237 |
formatter.field("movability", &Present); |
| 1238 |
} |
| 1239 |
if self.value.asyncness.is_some() { |
| 1240 |
formatter.field("asyncness", &Present); |
| 1241 |
} |
| 1242 |
if self.value.capture.is_some() { |
| 1243 |
formatter.field("capture", &Present); |
| 1244 |
} |
| 1245 |
if !self.value.inputs.is_empty() { |
| 1246 |
formatter.field("inputs", Lite(&self.value.inputs)); |
| 1247 |
} |
| 1248 |
formatter.field("output", Lite(&self.value.output)); |
| 1249 |
formatter.field("body", Lite(&self.value.body)); |
| 1250 |
formatter.finish() |
| 1251 |
} |
| 1252 |
} |
| 1253 |
impl Debug for Lite<syn::ExprConst> { |
| 1254 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1255 |
let mut formatter = formatter.debug_struct("ExprConst"); |
| 1256 |
if !self.value.attrs.is_empty() { |
| 1257 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1258 |
} |
| 1259 |
formatter.field("block", Lite(&self.value.block)); |
| 1260 |
formatter.finish() |
| 1261 |
} |
| 1262 |
} |
| 1263 |
impl Debug for Lite<syn::ExprContinue> { |
| 1264 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1265 |
let mut formatter = formatter.debug_struct("ExprContinue"); |
| 1266 |
if !self.value.attrs.is_empty() { |
| 1267 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1268 |
} |
| 1269 |
if let Some(val) = &self.value.label { |
| 1270 |
#[derive(RefCast)] |
| 1271 |
#[repr(transparent)] |
| 1272 |
struct Print(syn::Lifetime); |
| 1273 |
impl Debug for Print { |
| 1274 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1275 |
formatter.write_str("Some(")?; |
| 1276 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1277 |
formatter.write_str(")")?; |
| 1278 |
Ok(()) |
| 1279 |
} |
| 1280 |
} |
| 1281 |
formatter.field("label", Print::ref_cast(val)); |
| 1282 |
} |
| 1283 |
formatter.finish() |
| 1284 |
} |
| 1285 |
} |
| 1286 |
impl Debug for Lite<syn::ExprField> { |
| 1287 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1288 |
let mut formatter = formatter.debug_struct("ExprField"); |
| 1289 |
if !self.value.attrs.is_empty() { |
| 1290 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1291 |
} |
| 1292 |
formatter.field("base", Lite(&self.value.base)); |
| 1293 |
formatter.field("member", Lite(&self.value.member)); |
| 1294 |
formatter.finish() |
| 1295 |
} |
| 1296 |
} |
| 1297 |
impl Debug for Lite<syn::ExprForLoop> { |
| 1298 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1299 |
let mut formatter = formatter.debug_struct("ExprForLoop"); |
| 1300 |
if !self.value.attrs.is_empty() { |
| 1301 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1302 |
} |
| 1303 |
if let Some(val) = &self.value.label { |
| 1304 |
#[derive(RefCast)] |
| 1305 |
#[repr(transparent)] |
| 1306 |
struct Print(syn::Label); |
| 1307 |
impl Debug for Print { |
| 1308 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1309 |
formatter.write_str("Some(")?; |
| 1310 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1311 |
formatter.write_str(")")?; |
| 1312 |
Ok(()) |
| 1313 |
} |
| 1314 |
} |
| 1315 |
formatter.field("label", Print::ref_cast(val)); |
| 1316 |
} |
| 1317 |
formatter.field("pat", Lite(&self.value.pat)); |
| 1318 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1319 |
formatter.field("body", Lite(&self.value.body)); |
| 1320 |
formatter.finish() |
| 1321 |
} |
| 1322 |
} |
| 1323 |
impl Debug for Lite<syn::ExprGroup> { |
| 1324 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1325 |
let mut formatter = formatter.debug_struct("ExprGroup"); |
| 1326 |
if !self.value.attrs.is_empty() { |
| 1327 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1328 |
} |
| 1329 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1330 |
formatter.finish() |
| 1331 |
} |
| 1332 |
} |
| 1333 |
impl Debug for Lite<syn::ExprIf> { |
| 1334 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1335 |
let mut formatter = formatter.debug_struct("ExprIf"); |
| 1336 |
if !self.value.attrs.is_empty() { |
| 1337 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1338 |
} |
| 1339 |
formatter.field("cond", Lite(&self.value.cond)); |
| 1340 |
formatter.field("then_branch", Lite(&self.value.then_branch)); |
| 1341 |
if let Some(val) = &self.value.else_branch { |
| 1342 |
#[derive(RefCast)] |
| 1343 |
#[repr(transparent)] |
| 1344 |
struct Print((syn::token::Else, Box<syn::Expr>)); |
| 1345 |
impl Debug for Print { |
| 1346 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1347 |
formatter.write_str("Some(")?; |
| 1348 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 1349 |
formatter.write_str(")")?; |
| 1350 |
Ok(()) |
| 1351 |
} |
| 1352 |
} |
| 1353 |
formatter.field("else_branch", Print::ref_cast(val)); |
| 1354 |
} |
| 1355 |
formatter.finish() |
| 1356 |
} |
| 1357 |
} |
| 1358 |
impl Debug for Lite<syn::ExprIndex> { |
| 1359 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1360 |
let mut formatter = formatter.debug_struct("ExprIndex"); |
| 1361 |
if !self.value.attrs.is_empty() { |
| 1362 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1363 |
} |
| 1364 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1365 |
formatter.field("index", Lite(&self.value.index)); |
| 1366 |
formatter.finish() |
| 1367 |
} |
| 1368 |
} |
| 1369 |
impl Debug for Lite<syn::ExprInfer> { |
| 1370 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1371 |
let mut formatter = formatter.debug_struct("ExprInfer"); |
| 1372 |
if !self.value.attrs.is_empty() { |
| 1373 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1374 |
} |
| 1375 |
formatter.finish() |
| 1376 |
} |
| 1377 |
} |
| 1378 |
impl Debug for Lite<syn::ExprLet> { |
| 1379 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1380 |
let mut formatter = formatter.debug_struct("ExprLet"); |
| 1381 |
if !self.value.attrs.is_empty() { |
| 1382 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1383 |
} |
| 1384 |
formatter.field("pat", Lite(&self.value.pat)); |
| 1385 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1386 |
formatter.finish() |
| 1387 |
} |
| 1388 |
} |
| 1389 |
impl Debug for Lite<syn::ExprLit> { |
| 1390 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1391 |
let mut formatter = formatter.debug_struct("ExprLit"); |
| 1392 |
if !self.value.attrs.is_empty() { |
| 1393 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1394 |
} |
| 1395 |
formatter.field("lit", Lite(&self.value.lit)); |
| 1396 |
formatter.finish() |
| 1397 |
} |
| 1398 |
} |
| 1399 |
impl Debug for Lite<syn::ExprLoop> { |
| 1400 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1401 |
let mut formatter = formatter.debug_struct("ExprLoop"); |
| 1402 |
if !self.value.attrs.is_empty() { |
| 1403 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1404 |
} |
| 1405 |
if let Some(val) = &self.value.label { |
| 1406 |
#[derive(RefCast)] |
| 1407 |
#[repr(transparent)] |
| 1408 |
struct Print(syn::Label); |
| 1409 |
impl Debug for Print { |
| 1410 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1411 |
formatter.write_str("Some(")?; |
| 1412 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1413 |
formatter.write_str(")")?; |
| 1414 |
Ok(()) |
| 1415 |
} |
| 1416 |
} |
| 1417 |
formatter.field("label", Print::ref_cast(val)); |
| 1418 |
} |
| 1419 |
formatter.field("body", Lite(&self.value.body)); |
| 1420 |
formatter.finish() |
| 1421 |
} |
| 1422 |
} |
| 1423 |
impl Debug for Lite<syn::ExprMacro> { |
| 1424 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1425 |
let mut formatter = formatter.debug_struct("ExprMacro"); |
| 1426 |
if !self.value.attrs.is_empty() { |
| 1427 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1428 |
} |
| 1429 |
formatter.field("mac", Lite(&self.value.mac)); |
| 1430 |
formatter.finish() |
| 1431 |
} |
| 1432 |
} |
| 1433 |
impl Debug for Lite<syn::ExprMatch> { |
| 1434 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1435 |
let mut formatter = formatter.debug_struct("ExprMatch"); |
| 1436 |
if !self.value.attrs.is_empty() { |
| 1437 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1438 |
} |
| 1439 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1440 |
if !self.value.arms.is_empty() { |
| 1441 |
formatter.field("arms", Lite(&self.value.arms)); |
| 1442 |
} |
| 1443 |
formatter.finish() |
| 1444 |
} |
| 1445 |
} |
| 1446 |
impl Debug for Lite<syn::ExprMethodCall> { |
| 1447 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1448 |
let mut formatter = formatter.debug_struct("ExprMethodCall"); |
| 1449 |
if !self.value.attrs.is_empty() { |
| 1450 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1451 |
} |
| 1452 |
formatter.field("receiver", Lite(&self.value.receiver)); |
| 1453 |
formatter.field("method", Lite(&self.value.method)); |
| 1454 |
if let Some(val) = &self.value.turbofish { |
| 1455 |
#[derive(RefCast)] |
| 1456 |
#[repr(transparent)] |
| 1457 |
struct Print(syn::AngleBracketedGenericArguments); |
| 1458 |
impl Debug for Print { |
| 1459 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1460 |
formatter.write_str("Some(")?; |
| 1461 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1462 |
formatter.write_str(")")?; |
| 1463 |
Ok(()) |
| 1464 |
} |
| 1465 |
} |
| 1466 |
formatter.field("turbofish", Print::ref_cast(val)); |
| 1467 |
} |
| 1468 |
if !self.value.args.is_empty() { |
| 1469 |
formatter.field("args", Lite(&self.value.args)); |
| 1470 |
} |
| 1471 |
formatter.finish() |
| 1472 |
} |
| 1473 |
} |
| 1474 |
impl Debug for Lite<syn::ExprParen> { |
| 1475 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1476 |
let mut formatter = formatter.debug_struct("ExprParen"); |
| 1477 |
if !self.value.attrs.is_empty() { |
| 1478 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1479 |
} |
| 1480 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1481 |
formatter.finish() |
| 1482 |
} |
| 1483 |
} |
| 1484 |
impl Debug for Lite<syn::ExprPath> { |
| 1485 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1486 |
let mut formatter = formatter.debug_struct("ExprPath"); |
| 1487 |
if !self.value.attrs.is_empty() { |
| 1488 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1489 |
} |
| 1490 |
if let Some(val) = &self.value.qself { |
| 1491 |
#[derive(RefCast)] |
| 1492 |
#[repr(transparent)] |
| 1493 |
struct Print(syn::QSelf); |
| 1494 |
impl Debug for Print { |
| 1495 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1496 |
formatter.write_str("Some(")?; |
| 1497 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1498 |
formatter.write_str(")")?; |
| 1499 |
Ok(()) |
| 1500 |
} |
| 1501 |
} |
| 1502 |
formatter.field("qself", Print::ref_cast(val)); |
| 1503 |
} |
| 1504 |
formatter.field("path", Lite(&self.value.path)); |
| 1505 |
formatter.finish() |
| 1506 |
} |
| 1507 |
} |
| 1508 |
impl Debug for Lite<syn::ExprRange> { |
| 1509 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1510 |
let mut formatter = formatter.debug_struct("ExprRange"); |
| 1511 |
if !self.value.attrs.is_empty() { |
| 1512 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1513 |
} |
| 1514 |
if let Some(val) = &self.value.start { |
| 1515 |
#[derive(RefCast)] |
| 1516 |
#[repr(transparent)] |
| 1517 |
struct Print(Box<syn::Expr>); |
| 1518 |
impl Debug for Print { |
| 1519 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1520 |
formatter.write_str("Some(")?; |
| 1521 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1522 |
formatter.write_str(")")?; |
| 1523 |
Ok(()) |
| 1524 |
} |
| 1525 |
} |
| 1526 |
formatter.field("start", Print::ref_cast(val)); |
| 1527 |
} |
| 1528 |
formatter.field("limits", Lite(&self.value.limits)); |
| 1529 |
if let Some(val) = &self.value.end { |
| 1530 |
#[derive(RefCast)] |
| 1531 |
#[repr(transparent)] |
| 1532 |
struct Print(Box<syn::Expr>); |
| 1533 |
impl Debug for Print { |
| 1534 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1535 |
formatter.write_str("Some(")?; |
| 1536 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1537 |
formatter.write_str(")")?; |
| 1538 |
Ok(()) |
| 1539 |
} |
| 1540 |
} |
| 1541 |
formatter.field("end", Print::ref_cast(val)); |
| 1542 |
} |
| 1543 |
formatter.finish() |
| 1544 |
} |
| 1545 |
} |
| 1546 |
impl Debug for Lite<syn::ExprRawAddr> { |
| 1547 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1548 |
let mut formatter = formatter.debug_struct("ExprRawAddr"); |
| 1549 |
if !self.value.attrs.is_empty() { |
| 1550 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1551 |
} |
| 1552 |
formatter.field("mutability", Lite(&self.value.mutability)); |
| 1553 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1554 |
formatter.finish() |
| 1555 |
} |
| 1556 |
} |
| 1557 |
impl Debug for Lite<syn::ExprReference> { |
| 1558 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1559 |
let mut formatter = formatter.debug_struct("ExprReference"); |
| 1560 |
if !self.value.attrs.is_empty() { |
| 1561 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1562 |
} |
| 1563 |
if self.value.mutability.is_some() { |
| 1564 |
formatter.field("mutability", &Present); |
| 1565 |
} |
| 1566 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1567 |
formatter.finish() |
| 1568 |
} |
| 1569 |
} |
| 1570 |
impl Debug for Lite<syn::ExprRepeat> { |
| 1571 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1572 |
let mut formatter = formatter.debug_struct("ExprRepeat"); |
| 1573 |
if !self.value.attrs.is_empty() { |
| 1574 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1575 |
} |
| 1576 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1577 |
formatter.field("len", Lite(&self.value.len)); |
| 1578 |
formatter.finish() |
| 1579 |
} |
| 1580 |
} |
| 1581 |
impl Debug for Lite<syn::ExprReturn> { |
| 1582 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1583 |
let mut formatter = formatter.debug_struct("ExprReturn"); |
| 1584 |
if !self.value.attrs.is_empty() { |
| 1585 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1586 |
} |
| 1587 |
if let Some(val) = &self.value.expr { |
| 1588 |
#[derive(RefCast)] |
| 1589 |
#[repr(transparent)] |
| 1590 |
struct Print(Box<syn::Expr>); |
| 1591 |
impl Debug for Print { |
| 1592 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1593 |
formatter.write_str("Some(")?; |
| 1594 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1595 |
formatter.write_str(")")?; |
| 1596 |
Ok(()) |
| 1597 |
} |
| 1598 |
} |
| 1599 |
formatter.field("expr", Print::ref_cast(val)); |
| 1600 |
} |
| 1601 |
formatter.finish() |
| 1602 |
} |
| 1603 |
} |
| 1604 |
impl Debug for Lite<syn::ExprStruct> { |
| 1605 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1606 |
let mut formatter = formatter.debug_struct("ExprStruct"); |
| 1607 |
if !self.value.attrs.is_empty() { |
| 1608 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1609 |
} |
| 1610 |
if let Some(val) = &self.value.qself { |
| 1611 |
#[derive(RefCast)] |
| 1612 |
#[repr(transparent)] |
| 1613 |
struct Print(syn::QSelf); |
| 1614 |
impl Debug for Print { |
| 1615 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1616 |
formatter.write_str("Some(")?; |
| 1617 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1618 |
formatter.write_str(")")?; |
| 1619 |
Ok(()) |
| 1620 |
} |
| 1621 |
} |
| 1622 |
formatter.field("qself", Print::ref_cast(val)); |
| 1623 |
} |
| 1624 |
formatter.field("path", Lite(&self.value.path)); |
| 1625 |
if !self.value.fields.is_empty() { |
| 1626 |
formatter.field("fields", Lite(&self.value.fields)); |
| 1627 |
} |
| 1628 |
if self.value.dot2_token.is_some() { |
| 1629 |
formatter.field("dot2_token", &Present); |
| 1630 |
} |
| 1631 |
if let Some(val) = &self.value.rest { |
| 1632 |
#[derive(RefCast)] |
| 1633 |
#[repr(transparent)] |
| 1634 |
struct Print(Box<syn::Expr>); |
| 1635 |
impl Debug for Print { |
| 1636 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1637 |
formatter.write_str("Some(")?; |
| 1638 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1639 |
formatter.write_str(")")?; |
| 1640 |
Ok(()) |
| 1641 |
} |
| 1642 |
} |
| 1643 |
formatter.field("rest", Print::ref_cast(val)); |
| 1644 |
} |
| 1645 |
formatter.finish() |
| 1646 |
} |
| 1647 |
} |
| 1648 |
impl Debug for Lite<syn::ExprTry> { |
| 1649 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1650 |
let mut formatter = formatter.debug_struct("ExprTry"); |
| 1651 |
if !self.value.attrs.is_empty() { |
| 1652 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1653 |
} |
| 1654 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1655 |
formatter.finish() |
| 1656 |
} |
| 1657 |
} |
| 1658 |
impl Debug for Lite<syn::ExprTryBlock> { |
| 1659 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1660 |
let mut formatter = formatter.debug_struct("ExprTryBlock"); |
| 1661 |
if !self.value.attrs.is_empty() { |
| 1662 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1663 |
} |
| 1664 |
formatter.field("block", Lite(&self.value.block)); |
| 1665 |
formatter.finish() |
| 1666 |
} |
| 1667 |
} |
| 1668 |
impl Debug for Lite<syn::ExprTuple> { |
| 1669 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1670 |
let mut formatter = formatter.debug_struct("ExprTuple"); |
| 1671 |
if !self.value.attrs.is_empty() { |
| 1672 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1673 |
} |
| 1674 |
if !self.value.elems.is_empty() { |
| 1675 |
formatter.field("elems", Lite(&self.value.elems)); |
| 1676 |
} |
| 1677 |
formatter.finish() |
| 1678 |
} |
| 1679 |
} |
| 1680 |
impl Debug for Lite<syn::ExprUnary> { |
| 1681 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1682 |
let mut formatter = formatter.debug_struct("ExprUnary"); |
| 1683 |
if !self.value.attrs.is_empty() { |
| 1684 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1685 |
} |
| 1686 |
formatter.field("op", Lite(&self.value.op)); |
| 1687 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1688 |
formatter.finish() |
| 1689 |
} |
| 1690 |
} |
| 1691 |
impl Debug for Lite<syn::ExprUnsafe> { |
| 1692 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1693 |
let mut formatter = formatter.debug_struct("ExprUnsafe"); |
| 1694 |
if !self.value.attrs.is_empty() { |
| 1695 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1696 |
} |
| 1697 |
formatter.field("block", Lite(&self.value.block)); |
| 1698 |
formatter.finish() |
| 1699 |
} |
| 1700 |
} |
| 1701 |
impl Debug for Lite<syn::ExprWhile> { |
| 1702 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1703 |
let mut formatter = formatter.debug_struct("ExprWhile"); |
| 1704 |
if !self.value.attrs.is_empty() { |
| 1705 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1706 |
} |
| 1707 |
if let Some(val) = &self.value.label { |
| 1708 |
#[derive(RefCast)] |
| 1709 |
#[repr(transparent)] |
| 1710 |
struct Print(syn::Label); |
| 1711 |
impl Debug for Print { |
| 1712 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1713 |
formatter.write_str("Some(")?; |
| 1714 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1715 |
formatter.write_str(")")?; |
| 1716 |
Ok(()) |
| 1717 |
} |
| 1718 |
} |
| 1719 |
formatter.field("label", Print::ref_cast(val)); |
| 1720 |
} |
| 1721 |
formatter.field("cond", Lite(&self.value.cond)); |
| 1722 |
formatter.field("body", Lite(&self.value.body)); |
| 1723 |
formatter.finish() |
| 1724 |
} |
| 1725 |
} |
| 1726 |
impl Debug for Lite<syn::ExprYield> { |
| 1727 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1728 |
let mut formatter = formatter.debug_struct("ExprYield"); |
| 1729 |
if !self.value.attrs.is_empty() { |
| 1730 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1731 |
} |
| 1732 |
if let Some(val) = &self.value.expr { |
| 1733 |
#[derive(RefCast)] |
| 1734 |
#[repr(transparent)] |
| 1735 |
struct Print(Box<syn::Expr>); |
| 1736 |
impl Debug for Print { |
| 1737 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1738 |
formatter.write_str("Some(")?; |
| 1739 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1740 |
formatter.write_str(")")?; |
| 1741 |
Ok(()) |
| 1742 |
} |
| 1743 |
} |
| 1744 |
formatter.field("expr", Print::ref_cast(val)); |
| 1745 |
} |
| 1746 |
formatter.finish() |
| 1747 |
} |
| 1748 |
} |
| 1749 |
impl Debug for Lite<syn::Field> { |
| 1750 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1751 |
let mut formatter = formatter.debug_struct("Field"); |
| 1752 |
if !self.value.attrs.is_empty() { |
| 1753 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1754 |
} |
| 1755 |
formatter.field("vis", Lite(&self.value.vis)); |
| 1756 |
match self.value.mutability { |
| 1757 |
syn::FieldMutability::None => {} |
| 1758 |
_ => { |
| 1759 |
formatter.field("mutability", Lite(&self.value.mutability)); |
| 1760 |
} |
| 1761 |
} |
| 1762 |
if let Some(val) = &self.value.ident { |
| 1763 |
#[derive(RefCast)] |
| 1764 |
#[repr(transparent)] |
| 1765 |
struct Print(proc_macro2::Ident); |
| 1766 |
impl Debug for Print { |
| 1767 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1768 |
formatter.write_str("Some(")?; |
| 1769 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1770 |
formatter.write_str(")")?; |
| 1771 |
Ok(()) |
| 1772 |
} |
| 1773 |
} |
| 1774 |
formatter.field("ident", Print::ref_cast(val)); |
| 1775 |
} |
| 1776 |
if self.value.colon_token.is_some() { |
| 1777 |
formatter.field("colon_token", &Present); |
| 1778 |
} |
| 1779 |
formatter.field("ty", Lite(&self.value.ty)); |
| 1780 |
formatter.finish() |
| 1781 |
} |
| 1782 |
} |
| 1783 |
impl Debug for Lite<syn::FieldMutability> { |
| 1784 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1785 |
match &self.value { |
| 1786 |
syn::FieldMutability::None => formatter.write_str("FieldMutability::None"), |
| 1787 |
_ => unreachable!(), |
| 1788 |
} |
| 1789 |
} |
| 1790 |
} |
| 1791 |
impl Debug for Lite<syn::FieldPat> { |
| 1792 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1793 |
let mut formatter = formatter.debug_struct("FieldPat"); |
| 1794 |
if !self.value.attrs.is_empty() { |
| 1795 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1796 |
} |
| 1797 |
formatter.field("member", Lite(&self.value.member)); |
| 1798 |
if self.value.colon_token.is_some() { |
| 1799 |
formatter.field("colon_token", &Present); |
| 1800 |
} |
| 1801 |
formatter.field("pat", Lite(&self.value.pat)); |
| 1802 |
formatter.finish() |
| 1803 |
} |
| 1804 |
} |
| 1805 |
impl Debug for Lite<syn::FieldValue> { |
| 1806 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1807 |
let mut formatter = formatter.debug_struct("FieldValue"); |
| 1808 |
if !self.value.attrs.is_empty() { |
| 1809 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1810 |
} |
| 1811 |
formatter.field("member", Lite(&self.value.member)); |
| 1812 |
if self.value.colon_token.is_some() { |
| 1813 |
formatter.field("colon_token", &Present); |
| 1814 |
} |
| 1815 |
formatter.field("expr", Lite(&self.value.expr)); |
| 1816 |
formatter.finish() |
| 1817 |
} |
| 1818 |
} |
| 1819 |
impl Debug for Lite<syn::Fields> { |
| 1820 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1821 |
match &self.value { |
| 1822 |
syn::Fields::Named(_val) => { |
| 1823 |
let mut formatter = formatter.debug_struct("Fields::Named"); |
| 1824 |
if !_val.named.is_empty() { |
| 1825 |
formatter.field("named", Lite(&_val.named)); |
| 1826 |
} |
| 1827 |
formatter.finish() |
| 1828 |
} |
| 1829 |
syn::Fields::Unnamed(_val) => { |
| 1830 |
let mut formatter = formatter.debug_struct("Fields::Unnamed"); |
| 1831 |
if !_val.unnamed.is_empty() { |
| 1832 |
formatter.field("unnamed", Lite(&_val.unnamed)); |
| 1833 |
} |
| 1834 |
formatter.finish() |
| 1835 |
} |
| 1836 |
syn::Fields::Unit => formatter.write_str("Fields::Unit"), |
| 1837 |
} |
| 1838 |
} |
| 1839 |
} |
| 1840 |
impl Debug for Lite<syn::FieldsNamed> { |
| 1841 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1842 |
let mut formatter = formatter.debug_struct("FieldsNamed"); |
| 1843 |
if !self.value.named.is_empty() { |
| 1844 |
formatter.field("named", Lite(&self.value.named)); |
| 1845 |
} |
| 1846 |
formatter.finish() |
| 1847 |
} |
| 1848 |
} |
| 1849 |
impl Debug for Lite<syn::FieldsUnnamed> { |
| 1850 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1851 |
let mut formatter = formatter.debug_struct("FieldsUnnamed"); |
| 1852 |
if !self.value.unnamed.is_empty() { |
| 1853 |
formatter.field("unnamed", Lite(&self.value.unnamed)); |
| 1854 |
} |
| 1855 |
formatter.finish() |
| 1856 |
} |
| 1857 |
} |
| 1858 |
impl Debug for Lite<syn::File> { |
| 1859 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1860 |
let mut formatter = formatter.debug_struct("File"); |
| 1861 |
if let Some(val) = &self.value.shebang { |
| 1862 |
#[derive(RefCast)] |
| 1863 |
#[repr(transparent)] |
| 1864 |
struct Print(String); |
| 1865 |
impl Debug for Print { |
| 1866 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1867 |
formatter.write_str("Some(")?; |
| 1868 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 1869 |
formatter.write_str(")")?; |
| 1870 |
Ok(()) |
| 1871 |
} |
| 1872 |
} |
| 1873 |
formatter.field("shebang", Print::ref_cast(val)); |
| 1874 |
} |
| 1875 |
if !self.value.attrs.is_empty() { |
| 1876 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1877 |
} |
| 1878 |
if !self.value.items.is_empty() { |
| 1879 |
formatter.field("items", Lite(&self.value.items)); |
| 1880 |
} |
| 1881 |
formatter.finish() |
| 1882 |
} |
| 1883 |
} |
| 1884 |
impl Debug for Lite<syn::FnArg> { |
| 1885 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1886 |
match &self.value { |
| 1887 |
syn::FnArg::Receiver(_val) => { |
| 1888 |
formatter.write_str("FnArg::Receiver")?; |
| 1889 |
formatter.write_str("(")?; |
| 1890 |
Debug::fmt(Lite(_val), formatter)?; |
| 1891 |
formatter.write_str(")")?; |
| 1892 |
Ok(()) |
| 1893 |
} |
| 1894 |
syn::FnArg::Typed(_val) => { |
| 1895 |
formatter.write_str("FnArg::Typed")?; |
| 1896 |
formatter.write_str("(")?; |
| 1897 |
Debug::fmt(Lite(_val), formatter)?; |
| 1898 |
formatter.write_str(")")?; |
| 1899 |
Ok(()) |
| 1900 |
} |
| 1901 |
} |
| 1902 |
} |
| 1903 |
} |
| 1904 |
impl Debug for Lite<syn::ForeignItem> { |
| 1905 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1906 |
match &self.value { |
| 1907 |
syn::ForeignItem::Fn(_val) => { |
| 1908 |
let mut formatter = formatter.debug_struct("ForeignItem::Fn"); |
| 1909 |
if !_val.attrs.is_empty() { |
| 1910 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1911 |
} |
| 1912 |
formatter.field("vis", Lite(&_val.vis)); |
| 1913 |
formatter.field("sig", Lite(&_val.sig)); |
| 1914 |
formatter.finish() |
| 1915 |
} |
| 1916 |
syn::ForeignItem::Static(_val) => { |
| 1917 |
let mut formatter = formatter.debug_struct("ForeignItem::Static"); |
| 1918 |
if !_val.attrs.is_empty() { |
| 1919 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1920 |
} |
| 1921 |
formatter.field("vis", Lite(&_val.vis)); |
| 1922 |
match _val.mutability { |
| 1923 |
syn::StaticMutability::None => {} |
| 1924 |
_ => { |
| 1925 |
formatter.field("mutability", Lite(&_val.mutability)); |
| 1926 |
} |
| 1927 |
} |
| 1928 |
formatter.field("ident", Lite(&_val.ident)); |
| 1929 |
formatter.field("ty", Lite(&_val.ty)); |
| 1930 |
formatter.finish() |
| 1931 |
} |
| 1932 |
syn::ForeignItem::Type(_val) => { |
| 1933 |
let mut formatter = formatter.debug_struct("ForeignItem::Type"); |
| 1934 |
if !_val.attrs.is_empty() { |
| 1935 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1936 |
} |
| 1937 |
formatter.field("vis", Lite(&_val.vis)); |
| 1938 |
formatter.field("ident", Lite(&_val.ident)); |
| 1939 |
formatter.field("generics", Lite(&_val.generics)); |
| 1940 |
formatter.finish() |
| 1941 |
} |
| 1942 |
syn::ForeignItem::Macro(_val) => { |
| 1943 |
let mut formatter = formatter.debug_struct("ForeignItem::Macro"); |
| 1944 |
if !_val.attrs.is_empty() { |
| 1945 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 1946 |
} |
| 1947 |
formatter.field("mac", Lite(&_val.mac)); |
| 1948 |
if _val.semi_token.is_some() { |
| 1949 |
formatter.field("semi_token", &Present); |
| 1950 |
} |
| 1951 |
formatter.finish() |
| 1952 |
} |
| 1953 |
syn::ForeignItem::Verbatim(_val) => { |
| 1954 |
formatter.write_str("ForeignItem::Verbatim")?; |
| 1955 |
formatter.write_str("(`")?; |
| 1956 |
Display::fmt(_val, formatter)?; |
| 1957 |
formatter.write_str("`)")?; |
| 1958 |
Ok(()) |
| 1959 |
} |
| 1960 |
_ => unreachable!(), |
| 1961 |
} |
| 1962 |
} |
| 1963 |
} |
| 1964 |
impl Debug for Lite<syn::ForeignItemFn> { |
| 1965 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1966 |
let mut formatter = formatter.debug_struct("ForeignItemFn"); |
| 1967 |
if !self.value.attrs.is_empty() { |
| 1968 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1969 |
} |
| 1970 |
formatter.field("vis", Lite(&self.value.vis)); |
| 1971 |
formatter.field("sig", Lite(&self.value.sig)); |
| 1972 |
formatter.finish() |
| 1973 |
} |
| 1974 |
} |
| 1975 |
impl Debug for Lite<syn::ForeignItemMacro> { |
| 1976 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1977 |
let mut formatter = formatter.debug_struct("ForeignItemMacro"); |
| 1978 |
if !self.value.attrs.is_empty() { |
| 1979 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1980 |
} |
| 1981 |
formatter.field("mac", Lite(&self.value.mac)); |
| 1982 |
if self.value.semi_token.is_some() { |
| 1983 |
formatter.field("semi_token", &Present); |
| 1984 |
} |
| 1985 |
formatter.finish() |
| 1986 |
} |
| 1987 |
} |
| 1988 |
impl Debug for Lite<syn::ForeignItemStatic> { |
| 1989 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 1990 |
let mut formatter = formatter.debug_struct("ForeignItemStatic"); |
| 1991 |
if !self.value.attrs.is_empty() { |
| 1992 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 1993 |
} |
| 1994 |
formatter.field("vis", Lite(&self.value.vis)); |
| 1995 |
match self.value.mutability { |
| 1996 |
syn::StaticMutability::None => {} |
| 1997 |
_ => { |
| 1998 |
formatter.field("mutability", Lite(&self.value.mutability)); |
| 1999 |
} |
| 2000 |
} |
| 2001 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2002 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2003 |
formatter.finish() |
| 2004 |
} |
| 2005 |
} |
| 2006 |
impl Debug for Lite<syn::ForeignItemType> { |
| 2007 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2008 |
let mut formatter = formatter.debug_struct("ForeignItemType"); |
| 2009 |
if !self.value.attrs.is_empty() { |
| 2010 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2011 |
} |
| 2012 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2013 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2014 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2015 |
formatter.finish() |
| 2016 |
} |
| 2017 |
} |
| 2018 |
impl Debug for Lite<syn::GenericArgument> { |
| 2019 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2020 |
match &self.value { |
| 2021 |
syn::GenericArgument::Lifetime(_val) => { |
| 2022 |
formatter.write_str("GenericArgument::Lifetime")?; |
| 2023 |
formatter.write_str("(")?; |
| 2024 |
Debug::fmt(Lite(_val), formatter)?; |
| 2025 |
formatter.write_str(")")?; |
| 2026 |
Ok(()) |
| 2027 |
} |
| 2028 |
syn::GenericArgument::Type(_val) => { |
| 2029 |
formatter.write_str("GenericArgument::Type")?; |
| 2030 |
formatter.write_str("(")?; |
| 2031 |
Debug::fmt(Lite(_val), formatter)?; |
| 2032 |
formatter.write_str(")")?; |
| 2033 |
Ok(()) |
| 2034 |
} |
| 2035 |
syn::GenericArgument::Const(_val) => { |
| 2036 |
formatter.write_str("GenericArgument::Const")?; |
| 2037 |
formatter.write_str("(")?; |
| 2038 |
Debug::fmt(Lite(_val), formatter)?; |
| 2039 |
formatter.write_str(")")?; |
| 2040 |
Ok(()) |
| 2041 |
} |
| 2042 |
syn::GenericArgument::AssocType(_val) => { |
| 2043 |
formatter.write_str("GenericArgument::AssocType")?; |
| 2044 |
formatter.write_str("(")?; |
| 2045 |
Debug::fmt(Lite(_val), formatter)?; |
| 2046 |
formatter.write_str(")")?; |
| 2047 |
Ok(()) |
| 2048 |
} |
| 2049 |
syn::GenericArgument::AssocConst(_val) => { |
| 2050 |
formatter.write_str("GenericArgument::AssocConst")?; |
| 2051 |
formatter.write_str("(")?; |
| 2052 |
Debug::fmt(Lite(_val), formatter)?; |
| 2053 |
formatter.write_str(")")?; |
| 2054 |
Ok(()) |
| 2055 |
} |
| 2056 |
syn::GenericArgument::Constraint(_val) => { |
| 2057 |
formatter.write_str("GenericArgument::Constraint")?; |
| 2058 |
formatter.write_str("(")?; |
| 2059 |
Debug::fmt(Lite(_val), formatter)?; |
| 2060 |
formatter.write_str(")")?; |
| 2061 |
Ok(()) |
| 2062 |
} |
| 2063 |
_ => unreachable!(), |
| 2064 |
} |
| 2065 |
} |
| 2066 |
} |
| 2067 |
impl Debug for Lite<syn::GenericParam> { |
| 2068 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2069 |
match &self.value { |
| 2070 |
syn::GenericParam::Lifetime(_val) => { |
| 2071 |
formatter.write_str("GenericParam::Lifetime")?; |
| 2072 |
formatter.write_str("(")?; |
| 2073 |
Debug::fmt(Lite(_val), formatter)?; |
| 2074 |
formatter.write_str(")")?; |
| 2075 |
Ok(()) |
| 2076 |
} |
| 2077 |
syn::GenericParam::Type(_val) => { |
| 2078 |
formatter.write_str("GenericParam::Type")?; |
| 2079 |
formatter.write_str("(")?; |
| 2080 |
Debug::fmt(Lite(_val), formatter)?; |
| 2081 |
formatter.write_str(")")?; |
| 2082 |
Ok(()) |
| 2083 |
} |
| 2084 |
syn::GenericParam::Const(_val) => { |
| 2085 |
formatter.write_str("GenericParam::Const")?; |
| 2086 |
formatter.write_str("(")?; |
| 2087 |
Debug::fmt(Lite(_val), formatter)?; |
| 2088 |
formatter.write_str(")")?; |
| 2089 |
Ok(()) |
| 2090 |
} |
| 2091 |
} |
| 2092 |
} |
| 2093 |
} |
| 2094 |
impl Debug for Lite<syn::Generics> { |
| 2095 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2096 |
let mut formatter = formatter.debug_struct("Generics"); |
| 2097 |
if self.value.lt_token.is_some() { |
| 2098 |
formatter.field("lt_token", &Present); |
| 2099 |
} |
| 2100 |
if !self.value.params.is_empty() { |
| 2101 |
formatter.field("params", Lite(&self.value.params)); |
| 2102 |
} |
| 2103 |
if self.value.gt_token.is_some() { |
| 2104 |
formatter.field("gt_token", &Present); |
| 2105 |
} |
| 2106 |
if let Some(val) = &self.value.where_clause { |
| 2107 |
#[derive(RefCast)] |
| 2108 |
#[repr(transparent)] |
| 2109 |
struct Print(syn::WhereClause); |
| 2110 |
impl Debug for Print { |
| 2111 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2112 |
formatter.write_str("Some(")?; |
| 2113 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2114 |
formatter.write_str(")")?; |
| 2115 |
Ok(()) |
| 2116 |
} |
| 2117 |
} |
| 2118 |
formatter.field("where_clause", Print::ref_cast(val)); |
| 2119 |
} |
| 2120 |
formatter.finish() |
| 2121 |
} |
| 2122 |
} |
| 2123 |
impl Debug for Lite<syn::ImplItem> { |
| 2124 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2125 |
match &self.value { |
| 2126 |
syn::ImplItem::Const(_val) => { |
| 2127 |
let mut formatter = formatter.debug_struct("ImplItem::Const"); |
| 2128 |
if !_val.attrs.is_empty() { |
| 2129 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2130 |
} |
| 2131 |
formatter.field("vis", Lite(&_val.vis)); |
| 2132 |
if _val.defaultness.is_some() { |
| 2133 |
formatter.field("defaultness", &Present); |
| 2134 |
} |
| 2135 |
formatter.field("ident", Lite(&_val.ident)); |
| 2136 |
formatter.field("generics", Lite(&_val.generics)); |
| 2137 |
formatter.field("ty", Lite(&_val.ty)); |
| 2138 |
formatter.field("expr", Lite(&_val.expr)); |
| 2139 |
formatter.finish() |
| 2140 |
} |
| 2141 |
syn::ImplItem::Fn(_val) => { |
| 2142 |
let mut formatter = formatter.debug_struct("ImplItem::Fn"); |
| 2143 |
if !_val.attrs.is_empty() { |
| 2144 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2145 |
} |
| 2146 |
formatter.field("vis", Lite(&_val.vis)); |
| 2147 |
if _val.defaultness.is_some() { |
| 2148 |
formatter.field("defaultness", &Present); |
| 2149 |
} |
| 2150 |
formatter.field("sig", Lite(&_val.sig)); |
| 2151 |
formatter.field("block", Lite(&_val.block)); |
| 2152 |
formatter.finish() |
| 2153 |
} |
| 2154 |
syn::ImplItem::Type(_val) => { |
| 2155 |
let mut formatter = formatter.debug_struct("ImplItem::Type"); |
| 2156 |
if !_val.attrs.is_empty() { |
| 2157 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2158 |
} |
| 2159 |
formatter.field("vis", Lite(&_val.vis)); |
| 2160 |
if _val.defaultness.is_some() { |
| 2161 |
formatter.field("defaultness", &Present); |
| 2162 |
} |
| 2163 |
formatter.field("ident", Lite(&_val.ident)); |
| 2164 |
formatter.field("generics", Lite(&_val.generics)); |
| 2165 |
formatter.field("ty", Lite(&_val.ty)); |
| 2166 |
formatter.finish() |
| 2167 |
} |
| 2168 |
syn::ImplItem::Macro(_val) => { |
| 2169 |
let mut formatter = formatter.debug_struct("ImplItem::Macro"); |
| 2170 |
if !_val.attrs.is_empty() { |
| 2171 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2172 |
} |
| 2173 |
formatter.field("mac", Lite(&_val.mac)); |
| 2174 |
if _val.semi_token.is_some() { |
| 2175 |
formatter.field("semi_token", &Present); |
| 2176 |
} |
| 2177 |
formatter.finish() |
| 2178 |
} |
| 2179 |
syn::ImplItem::Verbatim(_val) => { |
| 2180 |
formatter.write_str("ImplItem::Verbatim")?; |
| 2181 |
formatter.write_str("(`")?; |
| 2182 |
Display::fmt(_val, formatter)?; |
| 2183 |
formatter.write_str("`)")?; |
| 2184 |
Ok(()) |
| 2185 |
} |
| 2186 |
_ => unreachable!(), |
| 2187 |
} |
| 2188 |
} |
| 2189 |
} |
| 2190 |
impl Debug for Lite<syn::ImplItemConst> { |
| 2191 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2192 |
let mut formatter = formatter.debug_struct("ImplItemConst"); |
| 2193 |
if !self.value.attrs.is_empty() { |
| 2194 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2195 |
} |
| 2196 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2197 |
if self.value.defaultness.is_some() { |
| 2198 |
formatter.field("defaultness", &Present); |
| 2199 |
} |
| 2200 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2201 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2202 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2203 |
formatter.field("expr", Lite(&self.value.expr)); |
| 2204 |
formatter.finish() |
| 2205 |
} |
| 2206 |
} |
| 2207 |
impl Debug for Lite<syn::ImplItemFn> { |
| 2208 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2209 |
let mut formatter = formatter.debug_struct("ImplItemFn"); |
| 2210 |
if !self.value.attrs.is_empty() { |
| 2211 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2212 |
} |
| 2213 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2214 |
if self.value.defaultness.is_some() { |
| 2215 |
formatter.field("defaultness", &Present); |
| 2216 |
} |
| 2217 |
formatter.field("sig", Lite(&self.value.sig)); |
| 2218 |
formatter.field("block", Lite(&self.value.block)); |
| 2219 |
formatter.finish() |
| 2220 |
} |
| 2221 |
} |
| 2222 |
impl Debug for Lite<syn::ImplItemMacro> { |
| 2223 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2224 |
let mut formatter = formatter.debug_struct("ImplItemMacro"); |
| 2225 |
if !self.value.attrs.is_empty() { |
| 2226 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2227 |
} |
| 2228 |
formatter.field("mac", Lite(&self.value.mac)); |
| 2229 |
if self.value.semi_token.is_some() { |
| 2230 |
formatter.field("semi_token", &Present); |
| 2231 |
} |
| 2232 |
formatter.finish() |
| 2233 |
} |
| 2234 |
} |
| 2235 |
impl Debug for Lite<syn::ImplItemType> { |
| 2236 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2237 |
let mut formatter = formatter.debug_struct("ImplItemType"); |
| 2238 |
if !self.value.attrs.is_empty() { |
| 2239 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2240 |
} |
| 2241 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2242 |
if self.value.defaultness.is_some() { |
| 2243 |
formatter.field("defaultness", &Present); |
| 2244 |
} |
| 2245 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2246 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2247 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2248 |
formatter.finish() |
| 2249 |
} |
| 2250 |
} |
| 2251 |
impl Debug for Lite<syn::ImplRestriction> { |
| 2252 |
fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2253 |
unreachable!() |
| 2254 |
} |
| 2255 |
} |
| 2256 |
impl Debug for Lite<syn::Index> { |
| 2257 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2258 |
let mut formatter = formatter.debug_struct("Index"); |
| 2259 |
formatter.field("index", Lite(&self.value.index)); |
| 2260 |
formatter.finish() |
| 2261 |
} |
| 2262 |
} |
| 2263 |
impl Debug for Lite<syn::Item> { |
| 2264 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2265 |
match &self.value { |
| 2266 |
syn::Item::Const(_val) => { |
| 2267 |
let mut formatter = formatter.debug_struct("Item::Const"); |
| 2268 |
if !_val.attrs.is_empty() { |
| 2269 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2270 |
} |
| 2271 |
formatter.field("vis", Lite(&_val.vis)); |
| 2272 |
formatter.field("ident", Lite(&_val.ident)); |
| 2273 |
formatter.field("generics", Lite(&_val.generics)); |
| 2274 |
formatter.field("ty", Lite(&_val.ty)); |
| 2275 |
formatter.field("expr", Lite(&_val.expr)); |
| 2276 |
formatter.finish() |
| 2277 |
} |
| 2278 |
syn::Item::Enum(_val) => { |
| 2279 |
let mut formatter = formatter.debug_struct("Item::Enum"); |
| 2280 |
if !_val.attrs.is_empty() { |
| 2281 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2282 |
} |
| 2283 |
formatter.field("vis", Lite(&_val.vis)); |
| 2284 |
formatter.field("ident", Lite(&_val.ident)); |
| 2285 |
formatter.field("generics", Lite(&_val.generics)); |
| 2286 |
if !_val.variants.is_empty() { |
| 2287 |
formatter.field("variants", Lite(&_val.variants)); |
| 2288 |
} |
| 2289 |
formatter.finish() |
| 2290 |
} |
| 2291 |
syn::Item::ExternCrate(_val) => { |
| 2292 |
let mut formatter = formatter.debug_struct("Item::ExternCrate"); |
| 2293 |
if !_val.attrs.is_empty() { |
| 2294 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2295 |
} |
| 2296 |
formatter.field("vis", Lite(&_val.vis)); |
| 2297 |
formatter.field("ident", Lite(&_val.ident)); |
| 2298 |
if let Some(val) = &_val.rename { |
| 2299 |
#[derive(RefCast)] |
| 2300 |
#[repr(transparent)] |
| 2301 |
struct Print((syn::token::As, proc_macro2::Ident)); |
| 2302 |
impl Debug for Print { |
| 2303 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2304 |
formatter.write_str("Some(")?; |
| 2305 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 2306 |
formatter.write_str(")")?; |
| 2307 |
Ok(()) |
| 2308 |
} |
| 2309 |
} |
| 2310 |
formatter.field("rename", Print::ref_cast(val)); |
| 2311 |
} |
| 2312 |
formatter.finish() |
| 2313 |
} |
| 2314 |
syn::Item::Fn(_val) => { |
| 2315 |
let mut formatter = formatter.debug_struct("Item::Fn"); |
| 2316 |
if !_val.attrs.is_empty() { |
| 2317 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2318 |
} |
| 2319 |
formatter.field("vis", Lite(&_val.vis)); |
| 2320 |
formatter.field("sig", Lite(&_val.sig)); |
| 2321 |
formatter.field("block", Lite(&_val.block)); |
| 2322 |
formatter.finish() |
| 2323 |
} |
| 2324 |
syn::Item::ForeignMod(_val) => { |
| 2325 |
let mut formatter = formatter.debug_struct("Item::ForeignMod"); |
| 2326 |
if !_val.attrs.is_empty() { |
| 2327 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2328 |
} |
| 2329 |
if _val.unsafety.is_some() { |
| 2330 |
formatter.field("unsafety", &Present); |
| 2331 |
} |
| 2332 |
formatter.field("abi", Lite(&_val.abi)); |
| 2333 |
if !_val.items.is_empty() { |
| 2334 |
formatter.field("items", Lite(&_val.items)); |
| 2335 |
} |
| 2336 |
formatter.finish() |
| 2337 |
} |
| 2338 |
syn::Item::Impl(_val) => { |
| 2339 |
let mut formatter = formatter.debug_struct("Item::Impl"); |
| 2340 |
if !_val.attrs.is_empty() { |
| 2341 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2342 |
} |
| 2343 |
if _val.defaultness.is_some() { |
| 2344 |
formatter.field("defaultness", &Present); |
| 2345 |
} |
| 2346 |
if _val.unsafety.is_some() { |
| 2347 |
formatter.field("unsafety", &Present); |
| 2348 |
} |
| 2349 |
formatter.field("generics", Lite(&_val.generics)); |
| 2350 |
if let Some(val) = &_val.trait_ { |
| 2351 |
#[derive(RefCast)] |
| 2352 |
#[repr(transparent)] |
| 2353 |
struct Print((Option<syn::token::Not>, syn::Path, syn::token::For)); |
| 2354 |
impl Debug for Print { |
| 2355 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2356 |
formatter.write_str("Some(")?; |
| 2357 |
Debug::fmt( |
| 2358 |
&( |
| 2359 |
&super::Option { |
| 2360 |
present: self.0.0.is_some(), |
| 2361 |
}, |
| 2362 |
Lite(&self.0.1), |
| 2363 |
), |
| 2364 |
formatter, |
| 2365 |
)?; |
| 2366 |
formatter.write_str(")")?; |
| 2367 |
Ok(()) |
| 2368 |
} |
| 2369 |
} |
| 2370 |
formatter.field("trait_", Print::ref_cast(val)); |
| 2371 |
} |
| 2372 |
formatter.field("self_ty", Lite(&_val.self_ty)); |
| 2373 |
if !_val.items.is_empty() { |
| 2374 |
formatter.field("items", Lite(&_val.items)); |
| 2375 |
} |
| 2376 |
formatter.finish() |
| 2377 |
} |
| 2378 |
syn::Item::Macro(_val) => { |
| 2379 |
let mut formatter = formatter.debug_struct("Item::Macro"); |
| 2380 |
if !_val.attrs.is_empty() { |
| 2381 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2382 |
} |
| 2383 |
if let Some(val) = &_val.ident { |
| 2384 |
#[derive(RefCast)] |
| 2385 |
#[repr(transparent)] |
| 2386 |
struct Print(proc_macro2::Ident); |
| 2387 |
impl Debug for Print { |
| 2388 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2389 |
formatter.write_str("Some(")?; |
| 2390 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2391 |
formatter.write_str(")")?; |
| 2392 |
Ok(()) |
| 2393 |
} |
| 2394 |
} |
| 2395 |
formatter.field("ident", Print::ref_cast(val)); |
| 2396 |
} |
| 2397 |
formatter.field("mac", Lite(&_val.mac)); |
| 2398 |
if _val.semi_token.is_some() { |
| 2399 |
formatter.field("semi_token", &Present); |
| 2400 |
} |
| 2401 |
formatter.finish() |
| 2402 |
} |
| 2403 |
syn::Item::Mod(_val) => { |
| 2404 |
let mut formatter = formatter.debug_struct("Item::Mod"); |
| 2405 |
if !_val.attrs.is_empty() { |
| 2406 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2407 |
} |
| 2408 |
formatter.field("vis", Lite(&_val.vis)); |
| 2409 |
if _val.unsafety.is_some() { |
| 2410 |
formatter.field("unsafety", &Present); |
| 2411 |
} |
| 2412 |
formatter.field("ident", Lite(&_val.ident)); |
| 2413 |
if let Some(val) = &_val.content { |
| 2414 |
#[derive(RefCast)] |
| 2415 |
#[repr(transparent)] |
| 2416 |
struct Print((syn::token::Brace, Vec<syn::Item>)); |
| 2417 |
impl Debug for Print { |
| 2418 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2419 |
formatter.write_str("Some(")?; |
| 2420 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 2421 |
formatter.write_str(")")?; |
| 2422 |
Ok(()) |
| 2423 |
} |
| 2424 |
} |
| 2425 |
formatter.field("content", Print::ref_cast(val)); |
| 2426 |
} |
| 2427 |
if _val.semi.is_some() { |
| 2428 |
formatter.field("semi", &Present); |
| 2429 |
} |
| 2430 |
formatter.finish() |
| 2431 |
} |
| 2432 |
syn::Item::Static(_val) => { |
| 2433 |
let mut formatter = formatter.debug_struct("Item::Static"); |
| 2434 |
if !_val.attrs.is_empty() { |
| 2435 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2436 |
} |
| 2437 |
formatter.field("vis", Lite(&_val.vis)); |
| 2438 |
match _val.mutability { |
| 2439 |
syn::StaticMutability::None => {} |
| 2440 |
_ => { |
| 2441 |
formatter.field("mutability", Lite(&_val.mutability)); |
| 2442 |
} |
| 2443 |
} |
| 2444 |
formatter.field("ident", Lite(&_val.ident)); |
| 2445 |
formatter.field("ty", Lite(&_val.ty)); |
| 2446 |
formatter.field("expr", Lite(&_val.expr)); |
| 2447 |
formatter.finish() |
| 2448 |
} |
| 2449 |
syn::Item::Struct(_val) => { |
| 2450 |
let mut formatter = formatter.debug_struct("Item::Struct"); |
| 2451 |
if !_val.attrs.is_empty() { |
| 2452 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2453 |
} |
| 2454 |
formatter.field("vis", Lite(&_val.vis)); |
| 2455 |
formatter.field("ident", Lite(&_val.ident)); |
| 2456 |
formatter.field("generics", Lite(&_val.generics)); |
| 2457 |
formatter.field("fields", Lite(&_val.fields)); |
| 2458 |
if _val.semi_token.is_some() { |
| 2459 |
formatter.field("semi_token", &Present); |
| 2460 |
} |
| 2461 |
formatter.finish() |
| 2462 |
} |
| 2463 |
syn::Item::Trait(_val) => { |
| 2464 |
let mut formatter = formatter.debug_struct("Item::Trait"); |
| 2465 |
if !_val.attrs.is_empty() { |
| 2466 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2467 |
} |
| 2468 |
formatter.field("vis", Lite(&_val.vis)); |
| 2469 |
if _val.unsafety.is_some() { |
| 2470 |
formatter.field("unsafety", &Present); |
| 2471 |
} |
| 2472 |
if _val.auto_token.is_some() { |
| 2473 |
formatter.field("auto_token", &Present); |
| 2474 |
} |
| 2475 |
if let Some(val) = &_val.restriction { |
| 2476 |
#[derive(RefCast)] |
| 2477 |
#[repr(transparent)] |
| 2478 |
struct Print(syn::ImplRestriction); |
| 2479 |
impl Debug for Print { |
| 2480 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2481 |
formatter.write_str("Some(")?; |
| 2482 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2483 |
formatter.write_str(")")?; |
| 2484 |
Ok(()) |
| 2485 |
} |
| 2486 |
} |
| 2487 |
formatter.field("restriction", Print::ref_cast(val)); |
| 2488 |
} |
| 2489 |
formatter.field("ident", Lite(&_val.ident)); |
| 2490 |
formatter.field("generics", Lite(&_val.generics)); |
| 2491 |
if _val.colon_token.is_some() { |
| 2492 |
formatter.field("colon_token", &Present); |
| 2493 |
} |
| 2494 |
if !_val.supertraits.is_empty() { |
| 2495 |
formatter.field("supertraits", Lite(&_val.supertraits)); |
| 2496 |
} |
| 2497 |
if !_val.items.is_empty() { |
| 2498 |
formatter.field("items", Lite(&_val.items)); |
| 2499 |
} |
| 2500 |
formatter.finish() |
| 2501 |
} |
| 2502 |
syn::Item::TraitAlias(_val) => { |
| 2503 |
let mut formatter = formatter.debug_struct("Item::TraitAlias"); |
| 2504 |
if !_val.attrs.is_empty() { |
| 2505 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2506 |
} |
| 2507 |
formatter.field("vis", Lite(&_val.vis)); |
| 2508 |
formatter.field("ident", Lite(&_val.ident)); |
| 2509 |
formatter.field("generics", Lite(&_val.generics)); |
| 2510 |
if !_val.bounds.is_empty() { |
| 2511 |
formatter.field("bounds", Lite(&_val.bounds)); |
| 2512 |
} |
| 2513 |
formatter.finish() |
| 2514 |
} |
| 2515 |
syn::Item::Type(_val) => { |
| 2516 |
let mut formatter = formatter.debug_struct("Item::Type"); |
| 2517 |
if !_val.attrs.is_empty() { |
| 2518 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2519 |
} |
| 2520 |
formatter.field("vis", Lite(&_val.vis)); |
| 2521 |
formatter.field("ident", Lite(&_val.ident)); |
| 2522 |
formatter.field("generics", Lite(&_val.generics)); |
| 2523 |
formatter.field("ty", Lite(&_val.ty)); |
| 2524 |
formatter.finish() |
| 2525 |
} |
| 2526 |
syn::Item::Union(_val) => { |
| 2527 |
let mut formatter = formatter.debug_struct("Item::Union"); |
| 2528 |
if !_val.attrs.is_empty() { |
| 2529 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2530 |
} |
| 2531 |
formatter.field("vis", Lite(&_val.vis)); |
| 2532 |
formatter.field("ident", Lite(&_val.ident)); |
| 2533 |
formatter.field("generics", Lite(&_val.generics)); |
| 2534 |
formatter.field("fields", Lite(&_val.fields)); |
| 2535 |
formatter.finish() |
| 2536 |
} |
| 2537 |
syn::Item::Use(_val) => { |
| 2538 |
let mut formatter = formatter.debug_struct("Item::Use"); |
| 2539 |
if !_val.attrs.is_empty() { |
| 2540 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 2541 |
} |
| 2542 |
formatter.field("vis", Lite(&_val.vis)); |
| 2543 |
if _val.leading_colon.is_some() { |
| 2544 |
formatter.field("leading_colon", &Present); |
| 2545 |
} |
| 2546 |
formatter.field("tree", Lite(&_val.tree)); |
| 2547 |
formatter.finish() |
| 2548 |
} |
| 2549 |
syn::Item::Verbatim(_val) => { |
| 2550 |
formatter.write_str("Item::Verbatim")?; |
| 2551 |
formatter.write_str("(`")?; |
| 2552 |
Display::fmt(_val, formatter)?; |
| 2553 |
formatter.write_str("`)")?; |
| 2554 |
Ok(()) |
| 2555 |
} |
| 2556 |
_ => unreachable!(), |
| 2557 |
} |
| 2558 |
} |
| 2559 |
} |
| 2560 |
impl Debug for Lite<syn::ItemConst> { |
| 2561 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2562 |
let mut formatter = formatter.debug_struct("ItemConst"); |
| 2563 |
if !self.value.attrs.is_empty() { |
| 2564 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2565 |
} |
| 2566 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2567 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2568 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2569 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2570 |
formatter.field("expr", Lite(&self.value.expr)); |
| 2571 |
formatter.finish() |
| 2572 |
} |
| 2573 |
} |
| 2574 |
impl Debug for Lite<syn::ItemEnum> { |
| 2575 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2576 |
let mut formatter = formatter.debug_struct("ItemEnum"); |
| 2577 |
if !self.value.attrs.is_empty() { |
| 2578 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2579 |
} |
| 2580 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2581 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2582 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2583 |
if !self.value.variants.is_empty() { |
| 2584 |
formatter.field("variants", Lite(&self.value.variants)); |
| 2585 |
} |
| 2586 |
formatter.finish() |
| 2587 |
} |
| 2588 |
} |
| 2589 |
impl Debug for Lite<syn::ItemExternCrate> { |
| 2590 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2591 |
let mut formatter = formatter.debug_struct("ItemExternCrate"); |
| 2592 |
if !self.value.attrs.is_empty() { |
| 2593 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2594 |
} |
| 2595 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2596 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2597 |
if let Some(val) = &self.value.rename { |
| 2598 |
#[derive(RefCast)] |
| 2599 |
#[repr(transparent)] |
| 2600 |
struct Print((syn::token::As, proc_macro2::Ident)); |
| 2601 |
impl Debug for Print { |
| 2602 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2603 |
formatter.write_str("Some(")?; |
| 2604 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 2605 |
formatter.write_str(")")?; |
| 2606 |
Ok(()) |
| 2607 |
} |
| 2608 |
} |
| 2609 |
formatter.field("rename", Print::ref_cast(val)); |
| 2610 |
} |
| 2611 |
formatter.finish() |
| 2612 |
} |
| 2613 |
} |
| 2614 |
impl Debug for Lite<syn::ItemFn> { |
| 2615 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2616 |
let mut formatter = formatter.debug_struct("ItemFn"); |
| 2617 |
if !self.value.attrs.is_empty() { |
| 2618 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2619 |
} |
| 2620 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2621 |
formatter.field("sig", Lite(&self.value.sig)); |
| 2622 |
formatter.field("block", Lite(&self.value.block)); |
| 2623 |
formatter.finish() |
| 2624 |
} |
| 2625 |
} |
| 2626 |
impl Debug for Lite<syn::ItemForeignMod> { |
| 2627 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2628 |
let mut formatter = formatter.debug_struct("ItemForeignMod"); |
| 2629 |
if !self.value.attrs.is_empty() { |
| 2630 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2631 |
} |
| 2632 |
if self.value.unsafety.is_some() { |
| 2633 |
formatter.field("unsafety", &Present); |
| 2634 |
} |
| 2635 |
formatter.field("abi", Lite(&self.value.abi)); |
| 2636 |
if !self.value.items.is_empty() { |
| 2637 |
formatter.field("items", Lite(&self.value.items)); |
| 2638 |
} |
| 2639 |
formatter.finish() |
| 2640 |
} |
| 2641 |
} |
| 2642 |
impl Debug for Lite<syn::ItemImpl> { |
| 2643 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2644 |
let mut formatter = formatter.debug_struct("ItemImpl"); |
| 2645 |
if !self.value.attrs.is_empty() { |
| 2646 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2647 |
} |
| 2648 |
if self.value.defaultness.is_some() { |
| 2649 |
formatter.field("defaultness", &Present); |
| 2650 |
} |
| 2651 |
if self.value.unsafety.is_some() { |
| 2652 |
formatter.field("unsafety", &Present); |
| 2653 |
} |
| 2654 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2655 |
if let Some(val) = &self.value.trait_ { |
| 2656 |
#[derive(RefCast)] |
| 2657 |
#[repr(transparent)] |
| 2658 |
struct Print((Option<syn::token::Not>, syn::Path, syn::token::For)); |
| 2659 |
impl Debug for Print { |
| 2660 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2661 |
formatter.write_str("Some(")?; |
| 2662 |
Debug::fmt( |
| 2663 |
&( |
| 2664 |
&super::Option { |
| 2665 |
present: self.0.0.is_some(), |
| 2666 |
}, |
| 2667 |
Lite(&self.0.1), |
| 2668 |
), |
| 2669 |
formatter, |
| 2670 |
)?; |
| 2671 |
formatter.write_str(")")?; |
| 2672 |
Ok(()) |
| 2673 |
} |
| 2674 |
} |
| 2675 |
formatter.field("trait_", Print::ref_cast(val)); |
| 2676 |
} |
| 2677 |
formatter.field("self_ty", Lite(&self.value.self_ty)); |
| 2678 |
if !self.value.items.is_empty() { |
| 2679 |
formatter.field("items", Lite(&self.value.items)); |
| 2680 |
} |
| 2681 |
formatter.finish() |
| 2682 |
} |
| 2683 |
} |
| 2684 |
impl Debug for Lite<syn::ItemMacro> { |
| 2685 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2686 |
let mut formatter = formatter.debug_struct("ItemMacro"); |
| 2687 |
if !self.value.attrs.is_empty() { |
| 2688 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2689 |
} |
| 2690 |
if let Some(val) = &self.value.ident { |
| 2691 |
#[derive(RefCast)] |
| 2692 |
#[repr(transparent)] |
| 2693 |
struct Print(proc_macro2::Ident); |
| 2694 |
impl Debug for Print { |
| 2695 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2696 |
formatter.write_str("Some(")?; |
| 2697 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2698 |
formatter.write_str(")")?; |
| 2699 |
Ok(()) |
| 2700 |
} |
| 2701 |
} |
| 2702 |
formatter.field("ident", Print::ref_cast(val)); |
| 2703 |
} |
| 2704 |
formatter.field("mac", Lite(&self.value.mac)); |
| 2705 |
if self.value.semi_token.is_some() { |
| 2706 |
formatter.field("semi_token", &Present); |
| 2707 |
} |
| 2708 |
formatter.finish() |
| 2709 |
} |
| 2710 |
} |
| 2711 |
impl Debug for Lite<syn::ItemMod> { |
| 2712 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2713 |
let mut formatter = formatter.debug_struct("ItemMod"); |
| 2714 |
if !self.value.attrs.is_empty() { |
| 2715 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2716 |
} |
| 2717 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2718 |
if self.value.unsafety.is_some() { |
| 2719 |
formatter.field("unsafety", &Present); |
| 2720 |
} |
| 2721 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2722 |
if let Some(val) = &self.value.content { |
| 2723 |
#[derive(RefCast)] |
| 2724 |
#[repr(transparent)] |
| 2725 |
struct Print((syn::token::Brace, Vec<syn::Item>)); |
| 2726 |
impl Debug for Print { |
| 2727 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2728 |
formatter.write_str("Some(")?; |
| 2729 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 2730 |
formatter.write_str(")")?; |
| 2731 |
Ok(()) |
| 2732 |
} |
| 2733 |
} |
| 2734 |
formatter.field("content", Print::ref_cast(val)); |
| 2735 |
} |
| 2736 |
if self.value.semi.is_some() { |
| 2737 |
formatter.field("semi", &Present); |
| 2738 |
} |
| 2739 |
formatter.finish() |
| 2740 |
} |
| 2741 |
} |
| 2742 |
impl Debug for Lite<syn::ItemStatic> { |
| 2743 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2744 |
let mut formatter = formatter.debug_struct("ItemStatic"); |
| 2745 |
if !self.value.attrs.is_empty() { |
| 2746 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2747 |
} |
| 2748 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2749 |
match self.value.mutability { |
| 2750 |
syn::StaticMutability::None => {} |
| 2751 |
_ => { |
| 2752 |
formatter.field("mutability", Lite(&self.value.mutability)); |
| 2753 |
} |
| 2754 |
} |
| 2755 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2756 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2757 |
formatter.field("expr", Lite(&self.value.expr)); |
| 2758 |
formatter.finish() |
| 2759 |
} |
| 2760 |
} |
| 2761 |
impl Debug for Lite<syn::ItemStruct> { |
| 2762 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2763 |
let mut formatter = formatter.debug_struct("ItemStruct"); |
| 2764 |
if !self.value.attrs.is_empty() { |
| 2765 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2766 |
} |
| 2767 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2768 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2769 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2770 |
formatter.field("fields", Lite(&self.value.fields)); |
| 2771 |
if self.value.semi_token.is_some() { |
| 2772 |
formatter.field("semi_token", &Present); |
| 2773 |
} |
| 2774 |
formatter.finish() |
| 2775 |
} |
| 2776 |
} |
| 2777 |
impl Debug for Lite<syn::ItemTrait> { |
| 2778 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2779 |
let mut formatter = formatter.debug_struct("ItemTrait"); |
| 2780 |
if !self.value.attrs.is_empty() { |
| 2781 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2782 |
} |
| 2783 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2784 |
if self.value.unsafety.is_some() { |
| 2785 |
formatter.field("unsafety", &Present); |
| 2786 |
} |
| 2787 |
if self.value.auto_token.is_some() { |
| 2788 |
formatter.field("auto_token", &Present); |
| 2789 |
} |
| 2790 |
if let Some(val) = &self.value.restriction { |
| 2791 |
#[derive(RefCast)] |
| 2792 |
#[repr(transparent)] |
| 2793 |
struct Print(syn::ImplRestriction); |
| 2794 |
impl Debug for Print { |
| 2795 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2796 |
formatter.write_str("Some(")?; |
| 2797 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2798 |
formatter.write_str(")")?; |
| 2799 |
Ok(()) |
| 2800 |
} |
| 2801 |
} |
| 2802 |
formatter.field("restriction", Print::ref_cast(val)); |
| 2803 |
} |
| 2804 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2805 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2806 |
if self.value.colon_token.is_some() { |
| 2807 |
formatter.field("colon_token", &Present); |
| 2808 |
} |
| 2809 |
if !self.value.supertraits.is_empty() { |
| 2810 |
formatter.field("supertraits", Lite(&self.value.supertraits)); |
| 2811 |
} |
| 2812 |
if !self.value.items.is_empty() { |
| 2813 |
formatter.field("items", Lite(&self.value.items)); |
| 2814 |
} |
| 2815 |
formatter.finish() |
| 2816 |
} |
| 2817 |
} |
| 2818 |
impl Debug for Lite<syn::ItemTraitAlias> { |
| 2819 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2820 |
let mut formatter = formatter.debug_struct("ItemTraitAlias"); |
| 2821 |
if !self.value.attrs.is_empty() { |
| 2822 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2823 |
} |
| 2824 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2825 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2826 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2827 |
if !self.value.bounds.is_empty() { |
| 2828 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 2829 |
} |
| 2830 |
formatter.finish() |
| 2831 |
} |
| 2832 |
} |
| 2833 |
impl Debug for Lite<syn::ItemType> { |
| 2834 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2835 |
let mut formatter = formatter.debug_struct("ItemType"); |
| 2836 |
if !self.value.attrs.is_empty() { |
| 2837 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2838 |
} |
| 2839 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2840 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2841 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2842 |
formatter.field("ty", Lite(&self.value.ty)); |
| 2843 |
formatter.finish() |
| 2844 |
} |
| 2845 |
} |
| 2846 |
impl Debug for Lite<syn::ItemUnion> { |
| 2847 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2848 |
let mut formatter = formatter.debug_struct("ItemUnion"); |
| 2849 |
if !self.value.attrs.is_empty() { |
| 2850 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2851 |
} |
| 2852 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2853 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2854 |
formatter.field("generics", Lite(&self.value.generics)); |
| 2855 |
formatter.field("fields", Lite(&self.value.fields)); |
| 2856 |
formatter.finish() |
| 2857 |
} |
| 2858 |
} |
| 2859 |
impl Debug for Lite<syn::ItemUse> { |
| 2860 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2861 |
let mut formatter = formatter.debug_struct("ItemUse"); |
| 2862 |
if !self.value.attrs.is_empty() { |
| 2863 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2864 |
} |
| 2865 |
formatter.field("vis", Lite(&self.value.vis)); |
| 2866 |
if self.value.leading_colon.is_some() { |
| 2867 |
formatter.field("leading_colon", &Present); |
| 2868 |
} |
| 2869 |
formatter.field("tree", Lite(&self.value.tree)); |
| 2870 |
formatter.finish() |
| 2871 |
} |
| 2872 |
} |
| 2873 |
impl Debug for Lite<syn::Label> { |
| 2874 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2875 |
let mut formatter = formatter.debug_struct("Label"); |
| 2876 |
formatter.field("name", Lite(&self.value.name)); |
| 2877 |
formatter.finish() |
| 2878 |
} |
| 2879 |
} |
| 2880 |
impl Debug for Lite<syn::Lifetime> { |
| 2881 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2882 |
let mut formatter = formatter.debug_struct("Lifetime"); |
| 2883 |
formatter.field("ident", Lite(&self.value.ident)); |
| 2884 |
formatter.finish() |
| 2885 |
} |
| 2886 |
} |
| 2887 |
impl Debug for Lite<syn::LifetimeParam> { |
| 2888 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2889 |
let mut formatter = formatter.debug_struct("LifetimeParam"); |
| 2890 |
if !self.value.attrs.is_empty() { |
| 2891 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2892 |
} |
| 2893 |
formatter.field("lifetime", Lite(&self.value.lifetime)); |
| 2894 |
if self.value.colon_token.is_some() { |
| 2895 |
formatter.field("colon_token", &Present); |
| 2896 |
} |
| 2897 |
if !self.value.bounds.is_empty() { |
| 2898 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 2899 |
} |
| 2900 |
formatter.finish() |
| 2901 |
} |
| 2902 |
} |
| 2903 |
impl Debug for Lite<syn::Lit> { |
| 2904 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2905 |
match &self.value { |
| 2906 |
syn::Lit::Str(_val) => write!(formatter, "{:?}", _val.value()), |
| 2907 |
syn::Lit::ByteStr(_val) => write!(formatter, "{:?}", _val.value()), |
| 2908 |
syn::Lit::CStr(_val) => write!(formatter, "{:?}", _val.value()), |
| 2909 |
syn::Lit::Byte(_val) => write!(formatter, "{:?}", _val.value()), |
| 2910 |
syn::Lit::Char(_val) => write!(formatter, "{:?}", _val.value()), |
| 2911 |
syn::Lit::Int(_val) => write!(formatter, "{}", _val), |
| 2912 |
syn::Lit::Float(_val) => write!(formatter, "{}", _val), |
| 2913 |
syn::Lit::Bool(_val) => { |
| 2914 |
let mut formatter = formatter.debug_struct("Lit::Bool"); |
| 2915 |
formatter.field("value", Lite(&_val.value)); |
| 2916 |
formatter.finish() |
| 2917 |
} |
| 2918 |
syn::Lit::Verbatim(_val) => { |
| 2919 |
formatter.write_str("Lit::Verbatim")?; |
| 2920 |
formatter.write_str("(`")?; |
| 2921 |
Display::fmt(_val, formatter)?; |
| 2922 |
formatter.write_str("`)")?; |
| 2923 |
Ok(()) |
| 2924 |
} |
| 2925 |
_ => unreachable!(), |
| 2926 |
} |
| 2927 |
} |
| 2928 |
} |
| 2929 |
impl Debug for Lite<syn::LitBool> { |
| 2930 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2931 |
let mut formatter = formatter.debug_struct("LitBool"); |
| 2932 |
formatter.field("value", Lite(&self.value.value)); |
| 2933 |
formatter.finish() |
| 2934 |
} |
| 2935 |
} |
| 2936 |
impl Debug for Lite<syn::LitByte> { |
| 2937 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2938 |
write!(formatter, "{:?}", self.value.value()) |
| 2939 |
} |
| 2940 |
} |
| 2941 |
impl Debug for Lite<syn::LitByteStr> { |
| 2942 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2943 |
write!(formatter, "{:?}", self.value.value()) |
| 2944 |
} |
| 2945 |
} |
| 2946 |
impl Debug for Lite<syn::LitCStr> { |
| 2947 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2948 |
write!(formatter, "{:?}", self.value.value()) |
| 2949 |
} |
| 2950 |
} |
| 2951 |
impl Debug for Lite<syn::LitChar> { |
| 2952 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2953 |
write!(formatter, "{:?}", self.value.value()) |
| 2954 |
} |
| 2955 |
} |
| 2956 |
impl Debug for Lite<syn::LitFloat> { |
| 2957 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2958 |
write!(formatter, "{}", & self.value) |
| 2959 |
} |
| 2960 |
} |
| 2961 |
impl Debug for Lite<syn::LitInt> { |
| 2962 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2963 |
write!(formatter, "{}", & self.value) |
| 2964 |
} |
| 2965 |
} |
| 2966 |
impl Debug for Lite<syn::LitStr> { |
| 2967 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2968 |
write!(formatter, "{:?}", self.value.value()) |
| 2969 |
} |
| 2970 |
} |
| 2971 |
impl Debug for Lite<syn::Local> { |
| 2972 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2973 |
let mut formatter = formatter.debug_struct("Local"); |
| 2974 |
if !self.value.attrs.is_empty() { |
| 2975 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 2976 |
} |
| 2977 |
formatter.field("pat", Lite(&self.value.pat)); |
| 2978 |
if let Some(val) = &self.value.init { |
| 2979 |
#[derive(RefCast)] |
| 2980 |
#[repr(transparent)] |
| 2981 |
struct Print(syn::LocalInit); |
| 2982 |
impl Debug for Print { |
| 2983 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2984 |
formatter.write_str("Some(")?; |
| 2985 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 2986 |
formatter.write_str(")")?; |
| 2987 |
Ok(()) |
| 2988 |
} |
| 2989 |
} |
| 2990 |
formatter.field("init", Print::ref_cast(val)); |
| 2991 |
} |
| 2992 |
formatter.finish() |
| 2993 |
} |
| 2994 |
} |
| 2995 |
impl Debug for Lite<syn::LocalInit> { |
| 2996 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 2997 |
let mut formatter = formatter.debug_struct("LocalInit"); |
| 2998 |
formatter.field("expr", Lite(&self.value.expr)); |
| 2999 |
if let Some(val) = &self.value.diverge { |
| 3000 |
#[derive(RefCast)] |
| 3001 |
#[repr(transparent)] |
| 3002 |
struct Print((syn::token::Else, Box<syn::Expr>)); |
| 3003 |
impl Debug for Print { |
| 3004 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3005 |
formatter.write_str("Some(")?; |
| 3006 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 3007 |
formatter.write_str(")")?; |
| 3008 |
Ok(()) |
| 3009 |
} |
| 3010 |
} |
| 3011 |
formatter.field("diverge", Print::ref_cast(val)); |
| 3012 |
} |
| 3013 |
formatter.finish() |
| 3014 |
} |
| 3015 |
} |
| 3016 |
impl Debug for Lite<syn::Macro> { |
| 3017 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3018 |
let mut formatter = formatter.debug_struct("Macro"); |
| 3019 |
formatter.field("path", Lite(&self.value.path)); |
| 3020 |
formatter.field("delimiter", Lite(&self.value.delimiter)); |
| 3021 |
formatter.field("tokens", Lite(&self.value.tokens)); |
| 3022 |
formatter.finish() |
| 3023 |
} |
| 3024 |
} |
| 3025 |
impl Debug for Lite<syn::MacroDelimiter> { |
| 3026 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3027 |
match &self.value { |
| 3028 |
syn::MacroDelimiter::Paren(_val) => { |
| 3029 |
formatter.write_str("MacroDelimiter::Paren")?; |
| 3030 |
Ok(()) |
| 3031 |
} |
| 3032 |
syn::MacroDelimiter::Brace(_val) => { |
| 3033 |
formatter.write_str("MacroDelimiter::Brace")?; |
| 3034 |
Ok(()) |
| 3035 |
} |
| 3036 |
syn::MacroDelimiter::Bracket(_val) => { |
| 3037 |
formatter.write_str("MacroDelimiter::Bracket")?; |
| 3038 |
Ok(()) |
| 3039 |
} |
| 3040 |
} |
| 3041 |
} |
| 3042 |
} |
| 3043 |
impl Debug for Lite<syn::Member> { |
| 3044 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3045 |
match &self.value { |
| 3046 |
syn::Member::Named(_val) => { |
| 3047 |
formatter.write_str("Member::Named")?; |
| 3048 |
formatter.write_str("(")?; |
| 3049 |
Debug::fmt(Lite(_val), formatter)?; |
| 3050 |
formatter.write_str(")")?; |
| 3051 |
Ok(()) |
| 3052 |
} |
| 3053 |
syn::Member::Unnamed(_val) => { |
| 3054 |
formatter.write_str("Member::Unnamed")?; |
| 3055 |
formatter.write_str("(")?; |
| 3056 |
Debug::fmt(Lite(_val), formatter)?; |
| 3057 |
formatter.write_str(")")?; |
| 3058 |
Ok(()) |
| 3059 |
} |
| 3060 |
} |
| 3061 |
} |
| 3062 |
} |
| 3063 |
impl Debug for Lite<syn::Meta> { |
| 3064 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3065 |
match &self.value { |
| 3066 |
syn::Meta::Path(_val) => { |
| 3067 |
let mut formatter = formatter.debug_struct("Meta::Path"); |
| 3068 |
if _val.leading_colon.is_some() { |
| 3069 |
formatter.field("leading_colon", &Present); |
| 3070 |
} |
| 3071 |
if !_val.segments.is_empty() { |
| 3072 |
formatter.field("segments", Lite(&_val.segments)); |
| 3073 |
} |
| 3074 |
formatter.finish() |
| 3075 |
} |
| 3076 |
syn::Meta::List(_val) => { |
| 3077 |
let mut formatter = formatter.debug_struct("Meta::List"); |
| 3078 |
formatter.field("path", Lite(&_val.path)); |
| 3079 |
formatter.field("delimiter", Lite(&_val.delimiter)); |
| 3080 |
formatter.field("tokens", Lite(&_val.tokens)); |
| 3081 |
formatter.finish() |
| 3082 |
} |
| 3083 |
syn::Meta::NameValue(_val) => { |
| 3084 |
let mut formatter = formatter.debug_struct("Meta::NameValue"); |
| 3085 |
formatter.field("path", Lite(&_val.path)); |
| 3086 |
formatter.field("value", Lite(&_val.value)); |
| 3087 |
formatter.finish() |
| 3088 |
} |
| 3089 |
} |
| 3090 |
} |
| 3091 |
} |
| 3092 |
impl Debug for Lite<syn::MetaList> { |
| 3093 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3094 |
let mut formatter = formatter.debug_struct("MetaList"); |
| 3095 |
formatter.field("path", Lite(&self.value.path)); |
| 3096 |
formatter.field("delimiter", Lite(&self.value.delimiter)); |
| 3097 |
formatter.field("tokens", Lite(&self.value.tokens)); |
| 3098 |
formatter.finish() |
| 3099 |
} |
| 3100 |
} |
| 3101 |
impl Debug for Lite<syn::MetaNameValue> { |
| 3102 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3103 |
let mut formatter = formatter.debug_struct("MetaNameValue"); |
| 3104 |
formatter.field("path", Lite(&self.value.path)); |
| 3105 |
formatter.field("value", Lite(&self.value.value)); |
| 3106 |
formatter.finish() |
| 3107 |
} |
| 3108 |
} |
| 3109 |
impl Debug for Lite<syn::ParenthesizedGenericArguments> { |
| 3110 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3111 |
let mut formatter = formatter.debug_struct("ParenthesizedGenericArguments"); |
| 3112 |
if !self.value.inputs.is_empty() { |
| 3113 |
formatter.field("inputs", Lite(&self.value.inputs)); |
| 3114 |
} |
| 3115 |
formatter.field("output", Lite(&self.value.output)); |
| 3116 |
formatter.finish() |
| 3117 |
} |
| 3118 |
} |
| 3119 |
impl Debug for Lite<syn::Pat> { |
| 3120 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3121 |
match &self.value { |
| 3122 |
syn::Pat::Const(_val) => { |
| 3123 |
formatter.write_str("Pat::Const")?; |
| 3124 |
formatter.write_str("(")?; |
| 3125 |
Debug::fmt(Lite(_val), formatter)?; |
| 3126 |
formatter.write_str(")")?; |
| 3127 |
Ok(()) |
| 3128 |
} |
| 3129 |
syn::Pat::Ident(_val) => { |
| 3130 |
let mut formatter = formatter.debug_struct("Pat::Ident"); |
| 3131 |
if !_val.attrs.is_empty() { |
| 3132 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3133 |
} |
| 3134 |
if _val.by_ref.is_some() { |
| 3135 |
formatter.field("by_ref", &Present); |
| 3136 |
} |
| 3137 |
if _val.mutability.is_some() { |
| 3138 |
formatter.field("mutability", &Present); |
| 3139 |
} |
| 3140 |
formatter.field("ident", Lite(&_val.ident)); |
| 3141 |
if let Some(val) = &_val.subpat { |
| 3142 |
#[derive(RefCast)] |
| 3143 |
#[repr(transparent)] |
| 3144 |
struct Print((syn::token::At, Box<syn::Pat>)); |
| 3145 |
impl Debug for Print { |
| 3146 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3147 |
formatter.write_str("Some(")?; |
| 3148 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 3149 |
formatter.write_str(")")?; |
| 3150 |
Ok(()) |
| 3151 |
} |
| 3152 |
} |
| 3153 |
formatter.field("subpat", Print::ref_cast(val)); |
| 3154 |
} |
| 3155 |
formatter.finish() |
| 3156 |
} |
| 3157 |
syn::Pat::Lit(_val) => { |
| 3158 |
formatter.write_str("Pat::Lit")?; |
| 3159 |
formatter.write_str("(")?; |
| 3160 |
Debug::fmt(Lite(_val), formatter)?; |
| 3161 |
formatter.write_str(")")?; |
| 3162 |
Ok(()) |
| 3163 |
} |
| 3164 |
syn::Pat::Macro(_val) => { |
| 3165 |
formatter.write_str("Pat::Macro")?; |
| 3166 |
formatter.write_str("(")?; |
| 3167 |
Debug::fmt(Lite(_val), formatter)?; |
| 3168 |
formatter.write_str(")")?; |
| 3169 |
Ok(()) |
| 3170 |
} |
| 3171 |
syn::Pat::Or(_val) => { |
| 3172 |
let mut formatter = formatter.debug_struct("Pat::Or"); |
| 3173 |
if !_val.attrs.is_empty() { |
| 3174 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3175 |
} |
| 3176 |
if _val.leading_vert.is_some() { |
| 3177 |
formatter.field("leading_vert", &Present); |
| 3178 |
} |
| 3179 |
if !_val.cases.is_empty() { |
| 3180 |
formatter.field("cases", Lite(&_val.cases)); |
| 3181 |
} |
| 3182 |
formatter.finish() |
| 3183 |
} |
| 3184 |
syn::Pat::Paren(_val) => { |
| 3185 |
let mut formatter = formatter.debug_struct("Pat::Paren"); |
| 3186 |
if !_val.attrs.is_empty() { |
| 3187 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3188 |
} |
| 3189 |
formatter.field("pat", Lite(&_val.pat)); |
| 3190 |
formatter.finish() |
| 3191 |
} |
| 3192 |
syn::Pat::Path(_val) => { |
| 3193 |
formatter.write_str("Pat::Path")?; |
| 3194 |
formatter.write_str("(")?; |
| 3195 |
Debug::fmt(Lite(_val), formatter)?; |
| 3196 |
formatter.write_str(")")?; |
| 3197 |
Ok(()) |
| 3198 |
} |
| 3199 |
syn::Pat::Range(_val) => { |
| 3200 |
formatter.write_str("Pat::Range")?; |
| 3201 |
formatter.write_str("(")?; |
| 3202 |
Debug::fmt(Lite(_val), formatter)?; |
| 3203 |
formatter.write_str(")")?; |
| 3204 |
Ok(()) |
| 3205 |
} |
| 3206 |
syn::Pat::Reference(_val) => { |
| 3207 |
let mut formatter = formatter.debug_struct("Pat::Reference"); |
| 3208 |
if !_val.attrs.is_empty() { |
| 3209 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3210 |
} |
| 3211 |
if _val.mutability.is_some() { |
| 3212 |
formatter.field("mutability", &Present); |
| 3213 |
} |
| 3214 |
formatter.field("pat", Lite(&_val.pat)); |
| 3215 |
formatter.finish() |
| 3216 |
} |
| 3217 |
syn::Pat::Rest(_val) => { |
| 3218 |
let mut formatter = formatter.debug_struct("Pat::Rest"); |
| 3219 |
if !_val.attrs.is_empty() { |
| 3220 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3221 |
} |
| 3222 |
formatter.finish() |
| 3223 |
} |
| 3224 |
syn::Pat::Slice(_val) => { |
| 3225 |
let mut formatter = formatter.debug_struct("Pat::Slice"); |
| 3226 |
if !_val.attrs.is_empty() { |
| 3227 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3228 |
} |
| 3229 |
if !_val.elems.is_empty() { |
| 3230 |
formatter.field("elems", Lite(&_val.elems)); |
| 3231 |
} |
| 3232 |
formatter.finish() |
| 3233 |
} |
| 3234 |
syn::Pat::Struct(_val) => { |
| 3235 |
let mut formatter = formatter.debug_struct("Pat::Struct"); |
| 3236 |
if !_val.attrs.is_empty() { |
| 3237 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3238 |
} |
| 3239 |
if let Some(val) = &_val.qself { |
| 3240 |
#[derive(RefCast)] |
| 3241 |
#[repr(transparent)] |
| 3242 |
struct Print(syn::QSelf); |
| 3243 |
impl Debug for Print { |
| 3244 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3245 |
formatter.write_str("Some(")?; |
| 3246 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3247 |
formatter.write_str(")")?; |
| 3248 |
Ok(()) |
| 3249 |
} |
| 3250 |
} |
| 3251 |
formatter.field("qself", Print::ref_cast(val)); |
| 3252 |
} |
| 3253 |
formatter.field("path", Lite(&_val.path)); |
| 3254 |
if !_val.fields.is_empty() { |
| 3255 |
formatter.field("fields", Lite(&_val.fields)); |
| 3256 |
} |
| 3257 |
if let Some(val) = &_val.rest { |
| 3258 |
#[derive(RefCast)] |
| 3259 |
#[repr(transparent)] |
| 3260 |
struct Print(syn::PatRest); |
| 3261 |
impl Debug for Print { |
| 3262 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3263 |
formatter.write_str("Some(")?; |
| 3264 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3265 |
formatter.write_str(")")?; |
| 3266 |
Ok(()) |
| 3267 |
} |
| 3268 |
} |
| 3269 |
formatter.field("rest", Print::ref_cast(val)); |
| 3270 |
} |
| 3271 |
formatter.finish() |
| 3272 |
} |
| 3273 |
syn::Pat::Tuple(_val) => { |
| 3274 |
let mut formatter = formatter.debug_struct("Pat::Tuple"); |
| 3275 |
if !_val.attrs.is_empty() { |
| 3276 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3277 |
} |
| 3278 |
if !_val.elems.is_empty() { |
| 3279 |
formatter.field("elems", Lite(&_val.elems)); |
| 3280 |
} |
| 3281 |
formatter.finish() |
| 3282 |
} |
| 3283 |
syn::Pat::TupleStruct(_val) => { |
| 3284 |
let mut formatter = formatter.debug_struct("Pat::TupleStruct"); |
| 3285 |
if !_val.attrs.is_empty() { |
| 3286 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3287 |
} |
| 3288 |
if let Some(val) = &_val.qself { |
| 3289 |
#[derive(RefCast)] |
| 3290 |
#[repr(transparent)] |
| 3291 |
struct Print(syn::QSelf); |
| 3292 |
impl Debug for Print { |
| 3293 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3294 |
formatter.write_str("Some(")?; |
| 3295 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3296 |
formatter.write_str(")")?; |
| 3297 |
Ok(()) |
| 3298 |
} |
| 3299 |
} |
| 3300 |
formatter.field("qself", Print::ref_cast(val)); |
| 3301 |
} |
| 3302 |
formatter.field("path", Lite(&_val.path)); |
| 3303 |
if !_val.elems.is_empty() { |
| 3304 |
formatter.field("elems", Lite(&_val.elems)); |
| 3305 |
} |
| 3306 |
formatter.finish() |
| 3307 |
} |
| 3308 |
syn::Pat::Type(_val) => { |
| 3309 |
let mut formatter = formatter.debug_struct("Pat::Type"); |
| 3310 |
if !_val.attrs.is_empty() { |
| 3311 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3312 |
} |
| 3313 |
formatter.field("pat", Lite(&_val.pat)); |
| 3314 |
formatter.field("ty", Lite(&_val.ty)); |
| 3315 |
formatter.finish() |
| 3316 |
} |
| 3317 |
syn::Pat::Verbatim(_val) => { |
| 3318 |
formatter.write_str("Pat::Verbatim")?; |
| 3319 |
formatter.write_str("(`")?; |
| 3320 |
Display::fmt(_val, formatter)?; |
| 3321 |
formatter.write_str("`)")?; |
| 3322 |
Ok(()) |
| 3323 |
} |
| 3324 |
syn::Pat::Wild(_val) => { |
| 3325 |
let mut formatter = formatter.debug_struct("Pat::Wild"); |
| 3326 |
if !_val.attrs.is_empty() { |
| 3327 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3328 |
} |
| 3329 |
formatter.finish() |
| 3330 |
} |
| 3331 |
_ => unreachable!(), |
| 3332 |
} |
| 3333 |
} |
| 3334 |
} |
| 3335 |
impl Debug for Lite<syn::PatIdent> { |
| 3336 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3337 |
let mut formatter = formatter.debug_struct("PatIdent"); |
| 3338 |
if !self.value.attrs.is_empty() { |
| 3339 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3340 |
} |
| 3341 |
if self.value.by_ref.is_some() { |
| 3342 |
formatter.field("by_ref", &Present); |
| 3343 |
} |
| 3344 |
if self.value.mutability.is_some() { |
| 3345 |
formatter.field("mutability", &Present); |
| 3346 |
} |
| 3347 |
formatter.field("ident", Lite(&self.value.ident)); |
| 3348 |
if let Some(val) = &self.value.subpat { |
| 3349 |
#[derive(RefCast)] |
| 3350 |
#[repr(transparent)] |
| 3351 |
struct Print((syn::token::At, Box<syn::Pat>)); |
| 3352 |
impl Debug for Print { |
| 3353 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3354 |
formatter.write_str("Some(")?; |
| 3355 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 3356 |
formatter.write_str(")")?; |
| 3357 |
Ok(()) |
| 3358 |
} |
| 3359 |
} |
| 3360 |
formatter.field("subpat", Print::ref_cast(val)); |
| 3361 |
} |
| 3362 |
formatter.finish() |
| 3363 |
} |
| 3364 |
} |
| 3365 |
impl Debug for Lite<syn::PatOr> { |
| 3366 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3367 |
let mut formatter = formatter.debug_struct("PatOr"); |
| 3368 |
if !self.value.attrs.is_empty() { |
| 3369 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3370 |
} |
| 3371 |
if self.value.leading_vert.is_some() { |
| 3372 |
formatter.field("leading_vert", &Present); |
| 3373 |
} |
| 3374 |
if !self.value.cases.is_empty() { |
| 3375 |
formatter.field("cases", Lite(&self.value.cases)); |
| 3376 |
} |
| 3377 |
formatter.finish() |
| 3378 |
} |
| 3379 |
} |
| 3380 |
impl Debug for Lite<syn::PatParen> { |
| 3381 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3382 |
let mut formatter = formatter.debug_struct("PatParen"); |
| 3383 |
if !self.value.attrs.is_empty() { |
| 3384 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3385 |
} |
| 3386 |
formatter.field("pat", Lite(&self.value.pat)); |
| 3387 |
formatter.finish() |
| 3388 |
} |
| 3389 |
} |
| 3390 |
impl Debug for Lite<syn::PatReference> { |
| 3391 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3392 |
let mut formatter = formatter.debug_struct("PatReference"); |
| 3393 |
if !self.value.attrs.is_empty() { |
| 3394 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3395 |
} |
| 3396 |
if self.value.mutability.is_some() { |
| 3397 |
formatter.field("mutability", &Present); |
| 3398 |
} |
| 3399 |
formatter.field("pat", Lite(&self.value.pat)); |
| 3400 |
formatter.finish() |
| 3401 |
} |
| 3402 |
} |
| 3403 |
impl Debug for Lite<syn::PatRest> { |
| 3404 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3405 |
let mut formatter = formatter.debug_struct("PatRest"); |
| 3406 |
if !self.value.attrs.is_empty() { |
| 3407 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3408 |
} |
| 3409 |
formatter.finish() |
| 3410 |
} |
| 3411 |
} |
| 3412 |
impl Debug for Lite<syn::PatSlice> { |
| 3413 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3414 |
let mut formatter = formatter.debug_struct("PatSlice"); |
| 3415 |
if !self.value.attrs.is_empty() { |
| 3416 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3417 |
} |
| 3418 |
if !self.value.elems.is_empty() { |
| 3419 |
formatter.field("elems", Lite(&self.value.elems)); |
| 3420 |
} |
| 3421 |
formatter.finish() |
| 3422 |
} |
| 3423 |
} |
| 3424 |
impl Debug for Lite<syn::PatStruct> { |
| 3425 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3426 |
let mut formatter = formatter.debug_struct("PatStruct"); |
| 3427 |
if !self.value.attrs.is_empty() { |
| 3428 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3429 |
} |
| 3430 |
if let Some(val) = &self.value.qself { |
| 3431 |
#[derive(RefCast)] |
| 3432 |
#[repr(transparent)] |
| 3433 |
struct Print(syn::QSelf); |
| 3434 |
impl Debug for Print { |
| 3435 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3436 |
formatter.write_str("Some(")?; |
| 3437 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3438 |
formatter.write_str(")")?; |
| 3439 |
Ok(()) |
| 3440 |
} |
| 3441 |
} |
| 3442 |
formatter.field("qself", Print::ref_cast(val)); |
| 3443 |
} |
| 3444 |
formatter.field("path", Lite(&self.value.path)); |
| 3445 |
if !self.value.fields.is_empty() { |
| 3446 |
formatter.field("fields", Lite(&self.value.fields)); |
| 3447 |
} |
| 3448 |
if let Some(val) = &self.value.rest { |
| 3449 |
#[derive(RefCast)] |
| 3450 |
#[repr(transparent)] |
| 3451 |
struct Print(syn::PatRest); |
| 3452 |
impl Debug for Print { |
| 3453 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3454 |
formatter.write_str("Some(")?; |
| 3455 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3456 |
formatter.write_str(")")?; |
| 3457 |
Ok(()) |
| 3458 |
} |
| 3459 |
} |
| 3460 |
formatter.field("rest", Print::ref_cast(val)); |
| 3461 |
} |
| 3462 |
formatter.finish() |
| 3463 |
} |
| 3464 |
} |
| 3465 |
impl Debug for Lite<syn::PatTuple> { |
| 3466 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3467 |
let mut formatter = formatter.debug_struct("PatTuple"); |
| 3468 |
if !self.value.attrs.is_empty() { |
| 3469 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3470 |
} |
| 3471 |
if !self.value.elems.is_empty() { |
| 3472 |
formatter.field("elems", Lite(&self.value.elems)); |
| 3473 |
} |
| 3474 |
formatter.finish() |
| 3475 |
} |
| 3476 |
} |
| 3477 |
impl Debug for Lite<syn::PatTupleStruct> { |
| 3478 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3479 |
let mut formatter = formatter.debug_struct("PatTupleStruct"); |
| 3480 |
if !self.value.attrs.is_empty() { |
| 3481 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3482 |
} |
| 3483 |
if let Some(val) = &self.value.qself { |
| 3484 |
#[derive(RefCast)] |
| 3485 |
#[repr(transparent)] |
| 3486 |
struct Print(syn::QSelf); |
| 3487 |
impl Debug for Print { |
| 3488 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3489 |
formatter.write_str("Some(")?; |
| 3490 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3491 |
formatter.write_str(")")?; |
| 3492 |
Ok(()) |
| 3493 |
} |
| 3494 |
} |
| 3495 |
formatter.field("qself", Print::ref_cast(val)); |
| 3496 |
} |
| 3497 |
formatter.field("path", Lite(&self.value.path)); |
| 3498 |
if !self.value.elems.is_empty() { |
| 3499 |
formatter.field("elems", Lite(&self.value.elems)); |
| 3500 |
} |
| 3501 |
formatter.finish() |
| 3502 |
} |
| 3503 |
} |
| 3504 |
impl Debug for Lite<syn::PatType> { |
| 3505 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3506 |
let mut formatter = formatter.debug_struct("PatType"); |
| 3507 |
if !self.value.attrs.is_empty() { |
| 3508 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3509 |
} |
| 3510 |
formatter.field("pat", Lite(&self.value.pat)); |
| 3511 |
formatter.field("ty", Lite(&self.value.ty)); |
| 3512 |
formatter.finish() |
| 3513 |
} |
| 3514 |
} |
| 3515 |
impl Debug for Lite<syn::PatWild> { |
| 3516 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3517 |
let mut formatter = formatter.debug_struct("PatWild"); |
| 3518 |
if !self.value.attrs.is_empty() { |
| 3519 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3520 |
} |
| 3521 |
formatter.finish() |
| 3522 |
} |
| 3523 |
} |
| 3524 |
impl Debug for Lite<syn::Path> { |
| 3525 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3526 |
let mut formatter = formatter.debug_struct("Path"); |
| 3527 |
if self.value.leading_colon.is_some() { |
| 3528 |
formatter.field("leading_colon", &Present); |
| 3529 |
} |
| 3530 |
if !self.value.segments.is_empty() { |
| 3531 |
formatter.field("segments", Lite(&self.value.segments)); |
| 3532 |
} |
| 3533 |
formatter.finish() |
| 3534 |
} |
| 3535 |
} |
| 3536 |
impl Debug for Lite<syn::PathArguments> { |
| 3537 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3538 |
match &self.value { |
| 3539 |
syn::PathArguments::None => formatter.write_str("PathArguments::None"), |
| 3540 |
syn::PathArguments::AngleBracketed(_val) => { |
| 3541 |
let mut formatter = formatter |
| 3542 |
.debug_struct("PathArguments::AngleBracketed"); |
| 3543 |
if _val.colon2_token.is_some() { |
| 3544 |
formatter.field("colon2_token", &Present); |
| 3545 |
} |
| 3546 |
if !_val.args.is_empty() { |
| 3547 |
formatter.field("args", Lite(&_val.args)); |
| 3548 |
} |
| 3549 |
formatter.finish() |
| 3550 |
} |
| 3551 |
syn::PathArguments::Parenthesized(_val) => { |
| 3552 |
let mut formatter = formatter |
| 3553 |
.debug_struct("PathArguments::Parenthesized"); |
| 3554 |
if !_val.inputs.is_empty() { |
| 3555 |
formatter.field("inputs", Lite(&_val.inputs)); |
| 3556 |
} |
| 3557 |
formatter.field("output", Lite(&_val.output)); |
| 3558 |
formatter.finish() |
| 3559 |
} |
| 3560 |
} |
| 3561 |
} |
| 3562 |
} |
| 3563 |
impl Debug for Lite<syn::PathSegment> { |
| 3564 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3565 |
let mut formatter = formatter.debug_struct("PathSegment"); |
| 3566 |
formatter.field("ident", Lite(&self.value.ident)); |
| 3567 |
match self.value.arguments { |
| 3568 |
syn::PathArguments::None => {} |
| 3569 |
_ => { |
| 3570 |
formatter.field("arguments", Lite(&self.value.arguments)); |
| 3571 |
} |
| 3572 |
} |
| 3573 |
formatter.finish() |
| 3574 |
} |
| 3575 |
} |
| 3576 |
impl Debug for Lite<syn::PointerMutability> { |
| 3577 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3578 |
match &self.value { |
| 3579 |
syn::PointerMutability::Const(_val) => { |
| 3580 |
formatter.write_str("PointerMutability::Const")?; |
| 3581 |
Ok(()) |
| 3582 |
} |
| 3583 |
syn::PointerMutability::Mut(_val) => { |
| 3584 |
formatter.write_str("PointerMutability::Mut")?; |
| 3585 |
Ok(()) |
| 3586 |
} |
| 3587 |
} |
| 3588 |
} |
| 3589 |
} |
| 3590 |
impl Debug for Lite<syn::PreciseCapture> { |
| 3591 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3592 |
let mut formatter = formatter.debug_struct("PreciseCapture"); |
| 3593 |
if !self.value.params.is_empty() { |
| 3594 |
formatter.field("params", Lite(&self.value.params)); |
| 3595 |
} |
| 3596 |
formatter.finish() |
| 3597 |
} |
| 3598 |
} |
| 3599 |
impl Debug for Lite<syn::PredicateLifetime> { |
| 3600 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3601 |
let mut formatter = formatter.debug_struct("PredicateLifetime"); |
| 3602 |
formatter.field("lifetime", Lite(&self.value.lifetime)); |
| 3603 |
if !self.value.bounds.is_empty() { |
| 3604 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 3605 |
} |
| 3606 |
formatter.finish() |
| 3607 |
} |
| 3608 |
} |
| 3609 |
impl Debug for Lite<syn::PredicateType> { |
| 3610 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3611 |
let mut formatter = formatter.debug_struct("PredicateType"); |
| 3612 |
if let Some(val) = &self.value.lifetimes { |
| 3613 |
#[derive(RefCast)] |
| 3614 |
#[repr(transparent)] |
| 3615 |
struct Print(syn::BoundLifetimes); |
| 3616 |
impl Debug for Print { |
| 3617 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3618 |
formatter.write_str("Some(")?; |
| 3619 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3620 |
formatter.write_str(")")?; |
| 3621 |
Ok(()) |
| 3622 |
} |
| 3623 |
} |
| 3624 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 3625 |
} |
| 3626 |
formatter.field("bounded_ty", Lite(&self.value.bounded_ty)); |
| 3627 |
if !self.value.bounds.is_empty() { |
| 3628 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 3629 |
} |
| 3630 |
formatter.finish() |
| 3631 |
} |
| 3632 |
} |
| 3633 |
impl Debug for Lite<syn::QSelf> { |
| 3634 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3635 |
let mut formatter = formatter.debug_struct("QSelf"); |
| 3636 |
formatter.field("ty", Lite(&self.value.ty)); |
| 3637 |
formatter.field("position", Lite(&self.value.position)); |
| 3638 |
if self.value.as_token.is_some() { |
| 3639 |
formatter.field("as_token", &Present); |
| 3640 |
} |
| 3641 |
formatter.finish() |
| 3642 |
} |
| 3643 |
} |
| 3644 |
impl Debug for Lite<syn::RangeLimits> { |
| 3645 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3646 |
match &self.value { |
| 3647 |
syn::RangeLimits::HalfOpen(_val) => { |
| 3648 |
formatter.write_str("RangeLimits::HalfOpen")?; |
| 3649 |
Ok(()) |
| 3650 |
} |
| 3651 |
syn::RangeLimits::Closed(_val) => { |
| 3652 |
formatter.write_str("RangeLimits::Closed")?; |
| 3653 |
Ok(()) |
| 3654 |
} |
| 3655 |
} |
| 3656 |
} |
| 3657 |
} |
| 3658 |
impl Debug for Lite<syn::Receiver> { |
| 3659 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3660 |
let mut formatter = formatter.debug_struct("Receiver"); |
| 3661 |
if !self.value.attrs.is_empty() { |
| 3662 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3663 |
} |
| 3664 |
if let Some(val) = &self.value.reference { |
| 3665 |
#[derive(RefCast)] |
| 3666 |
#[repr(transparent)] |
| 3667 |
struct Print((syn::token::And, Option<syn::Lifetime>)); |
| 3668 |
impl Debug for Print { |
| 3669 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3670 |
formatter.write_str("Some(")?; |
| 3671 |
Debug::fmt( |
| 3672 |
{ |
| 3673 |
#[derive(RefCast)] |
| 3674 |
#[repr(transparent)] |
| 3675 |
struct Print(Option<syn::Lifetime>); |
| 3676 |
impl Debug for Print { |
| 3677 |
fn fmt( |
| 3678 |
&self, |
| 3679 |
formatter: &mut fmt::Formatter, |
| 3680 |
) -> fmt::Result { |
| 3681 |
match &self.0 { |
| 3682 |
Some(_val) => { |
| 3683 |
formatter.write_str("Some(")?; |
| 3684 |
Debug::fmt(Lite(_val), formatter)?; |
| 3685 |
formatter.write_str(")")?; |
| 3686 |
Ok(()) |
| 3687 |
} |
| 3688 |
None => formatter.write_str("None"), |
| 3689 |
} |
| 3690 |
} |
| 3691 |
} |
| 3692 |
Print::ref_cast(&self.0.1) |
| 3693 |
}, |
| 3694 |
formatter, |
| 3695 |
)?; |
| 3696 |
formatter.write_str(")")?; |
| 3697 |
Ok(()) |
| 3698 |
} |
| 3699 |
} |
| 3700 |
formatter.field("reference", Print::ref_cast(val)); |
| 3701 |
} |
| 3702 |
if self.value.mutability.is_some() { |
| 3703 |
formatter.field("mutability", &Present); |
| 3704 |
} |
| 3705 |
if self.value.colon_token.is_some() { |
| 3706 |
formatter.field("colon_token", &Present); |
| 3707 |
} |
| 3708 |
formatter.field("ty", Lite(&self.value.ty)); |
| 3709 |
formatter.finish() |
| 3710 |
} |
| 3711 |
} |
| 3712 |
impl Debug for Lite<syn::ReturnType> { |
| 3713 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3714 |
match &self.value { |
| 3715 |
syn::ReturnType::Default => formatter.write_str("ReturnType::Default"), |
| 3716 |
syn::ReturnType::Type(_v0, _v1) => { |
| 3717 |
let mut formatter = formatter.debug_tuple("ReturnType::Type"); |
| 3718 |
formatter.field(Lite(_v1)); |
| 3719 |
formatter.finish() |
| 3720 |
} |
| 3721 |
} |
| 3722 |
} |
| 3723 |
} |
| 3724 |
impl Debug for Lite<syn::Signature> { |
| 3725 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3726 |
let mut formatter = formatter.debug_struct("Signature"); |
| 3727 |
if self.value.constness.is_some() { |
| 3728 |
formatter.field("constness", &Present); |
| 3729 |
} |
| 3730 |
if self.value.asyncness.is_some() { |
| 3731 |
formatter.field("asyncness", &Present); |
| 3732 |
} |
| 3733 |
if self.value.unsafety.is_some() { |
| 3734 |
formatter.field("unsafety", &Present); |
| 3735 |
} |
| 3736 |
if let Some(val) = &self.value.abi { |
| 3737 |
#[derive(RefCast)] |
| 3738 |
#[repr(transparent)] |
| 3739 |
struct Print(syn::Abi); |
| 3740 |
impl Debug for Print { |
| 3741 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3742 |
formatter.write_str("Some(")?; |
| 3743 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3744 |
formatter.write_str(")")?; |
| 3745 |
Ok(()) |
| 3746 |
} |
| 3747 |
} |
| 3748 |
formatter.field("abi", Print::ref_cast(val)); |
| 3749 |
} |
| 3750 |
formatter.field("ident", Lite(&self.value.ident)); |
| 3751 |
formatter.field("generics", Lite(&self.value.generics)); |
| 3752 |
if !self.value.inputs.is_empty() { |
| 3753 |
formatter.field("inputs", Lite(&self.value.inputs)); |
| 3754 |
} |
| 3755 |
if let Some(val) = &self.value.variadic { |
| 3756 |
#[derive(RefCast)] |
| 3757 |
#[repr(transparent)] |
| 3758 |
struct Print(syn::Variadic); |
| 3759 |
impl Debug for Print { |
| 3760 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3761 |
formatter.write_str("Some(")?; |
| 3762 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3763 |
formatter.write_str(")")?; |
| 3764 |
Ok(()) |
| 3765 |
} |
| 3766 |
} |
| 3767 |
formatter.field("variadic", Print::ref_cast(val)); |
| 3768 |
} |
| 3769 |
formatter.field("output", Lite(&self.value.output)); |
| 3770 |
formatter.finish() |
| 3771 |
} |
| 3772 |
} |
| 3773 |
impl Debug for Lite<syn::StaticMutability> { |
| 3774 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3775 |
match &self.value { |
| 3776 |
syn::StaticMutability::Mut(_val) => { |
| 3777 |
formatter.write_str("StaticMutability::Mut")?; |
| 3778 |
Ok(()) |
| 3779 |
} |
| 3780 |
syn::StaticMutability::None => formatter.write_str("StaticMutability::None"), |
| 3781 |
_ => unreachable!(), |
| 3782 |
} |
| 3783 |
} |
| 3784 |
} |
| 3785 |
impl Debug for Lite<syn::Stmt> { |
| 3786 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3787 |
match &self.value { |
| 3788 |
syn::Stmt::Local(_val) => { |
| 3789 |
let mut formatter = formatter.debug_struct("Stmt::Local"); |
| 3790 |
if !_val.attrs.is_empty() { |
| 3791 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3792 |
} |
| 3793 |
formatter.field("pat", Lite(&_val.pat)); |
| 3794 |
if let Some(val) = &_val.init { |
| 3795 |
#[derive(RefCast)] |
| 3796 |
#[repr(transparent)] |
| 3797 |
struct Print(syn::LocalInit); |
| 3798 |
impl Debug for Print { |
| 3799 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3800 |
formatter.write_str("Some(")?; |
| 3801 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3802 |
formatter.write_str(")")?; |
| 3803 |
Ok(()) |
| 3804 |
} |
| 3805 |
} |
| 3806 |
formatter.field("init", Print::ref_cast(val)); |
| 3807 |
} |
| 3808 |
formatter.finish() |
| 3809 |
} |
| 3810 |
syn::Stmt::Item(_val) => { |
| 3811 |
formatter.write_str("Stmt::Item")?; |
| 3812 |
formatter.write_str("(")?; |
| 3813 |
Debug::fmt(Lite(_val), formatter)?; |
| 3814 |
formatter.write_str(")")?; |
| 3815 |
Ok(()) |
| 3816 |
} |
| 3817 |
syn::Stmt::Expr(_v0, _v1) => { |
| 3818 |
let mut formatter = formatter.debug_tuple("Stmt::Expr"); |
| 3819 |
formatter.field(Lite(_v0)); |
| 3820 |
formatter |
| 3821 |
.field( |
| 3822 |
&super::Option { |
| 3823 |
present: _v1.is_some(), |
| 3824 |
}, |
| 3825 |
); |
| 3826 |
formatter.finish() |
| 3827 |
} |
| 3828 |
syn::Stmt::Macro(_val) => { |
| 3829 |
let mut formatter = formatter.debug_struct("Stmt::Macro"); |
| 3830 |
if !_val.attrs.is_empty() { |
| 3831 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3832 |
} |
| 3833 |
formatter.field("mac", Lite(&_val.mac)); |
| 3834 |
if _val.semi_token.is_some() { |
| 3835 |
formatter.field("semi_token", &Present); |
| 3836 |
} |
| 3837 |
formatter.finish() |
| 3838 |
} |
| 3839 |
} |
| 3840 |
} |
| 3841 |
} |
| 3842 |
impl Debug for Lite<syn::StmtMacro> { |
| 3843 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3844 |
let mut formatter = formatter.debug_struct("StmtMacro"); |
| 3845 |
if !self.value.attrs.is_empty() { |
| 3846 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 3847 |
} |
| 3848 |
formatter.field("mac", Lite(&self.value.mac)); |
| 3849 |
if self.value.semi_token.is_some() { |
| 3850 |
formatter.field("semi_token", &Present); |
| 3851 |
} |
| 3852 |
formatter.finish() |
| 3853 |
} |
| 3854 |
} |
| 3855 |
impl Debug for Lite<syn::TraitBound> { |
| 3856 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3857 |
let mut formatter = formatter.debug_struct("TraitBound"); |
| 3858 |
if self.value.paren_token.is_some() { |
| 3859 |
formatter.field("paren_token", &Present); |
| 3860 |
} |
| 3861 |
match self.value.modifier { |
| 3862 |
syn::TraitBoundModifier::None => {} |
| 3863 |
_ => { |
| 3864 |
formatter.field("modifier", Lite(&self.value.modifier)); |
| 3865 |
} |
| 3866 |
} |
| 3867 |
if let Some(val) = &self.value.lifetimes { |
| 3868 |
#[derive(RefCast)] |
| 3869 |
#[repr(transparent)] |
| 3870 |
struct Print(syn::BoundLifetimes); |
| 3871 |
impl Debug for Print { |
| 3872 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3873 |
formatter.write_str("Some(")?; |
| 3874 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3875 |
formatter.write_str(")")?; |
| 3876 |
Ok(()) |
| 3877 |
} |
| 3878 |
} |
| 3879 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 3880 |
} |
| 3881 |
formatter.field("path", Lite(&self.value.path)); |
| 3882 |
formatter.finish() |
| 3883 |
} |
| 3884 |
} |
| 3885 |
impl Debug for Lite<syn::TraitBoundModifier> { |
| 3886 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3887 |
match &self.value { |
| 3888 |
syn::TraitBoundModifier::None => { |
| 3889 |
formatter.write_str("TraitBoundModifier::None") |
| 3890 |
} |
| 3891 |
syn::TraitBoundModifier::Maybe(_val) => { |
| 3892 |
formatter.write_str("TraitBoundModifier::Maybe")?; |
| 3893 |
Ok(()) |
| 3894 |
} |
| 3895 |
} |
| 3896 |
} |
| 3897 |
} |
| 3898 |
impl Debug for Lite<syn::TraitItem> { |
| 3899 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3900 |
match &self.value { |
| 3901 |
syn::TraitItem::Const(_val) => { |
| 3902 |
let mut formatter = formatter.debug_struct("TraitItem::Const"); |
| 3903 |
if !_val.attrs.is_empty() { |
| 3904 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3905 |
} |
| 3906 |
formatter.field("ident", Lite(&_val.ident)); |
| 3907 |
formatter.field("generics", Lite(&_val.generics)); |
| 3908 |
formatter.field("ty", Lite(&_val.ty)); |
| 3909 |
if let Some(val) = &_val.default { |
| 3910 |
#[derive(RefCast)] |
| 3911 |
#[repr(transparent)] |
| 3912 |
struct Print((syn::token::Eq, syn::Expr)); |
| 3913 |
impl Debug for Print { |
| 3914 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3915 |
formatter.write_str("Some(")?; |
| 3916 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 3917 |
formatter.write_str(")")?; |
| 3918 |
Ok(()) |
| 3919 |
} |
| 3920 |
} |
| 3921 |
formatter.field("default", Print::ref_cast(val)); |
| 3922 |
} |
| 3923 |
formatter.finish() |
| 3924 |
} |
| 3925 |
syn::TraitItem::Fn(_val) => { |
| 3926 |
let mut formatter = formatter.debug_struct("TraitItem::Fn"); |
| 3927 |
if !_val.attrs.is_empty() { |
| 3928 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3929 |
} |
| 3930 |
formatter.field("sig", Lite(&_val.sig)); |
| 3931 |
if let Some(val) = &_val.default { |
| 3932 |
#[derive(RefCast)] |
| 3933 |
#[repr(transparent)] |
| 3934 |
struct Print(syn::Block); |
| 3935 |
impl Debug for Print { |
| 3936 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3937 |
formatter.write_str("Some(")?; |
| 3938 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 3939 |
formatter.write_str(")")?; |
| 3940 |
Ok(()) |
| 3941 |
} |
| 3942 |
} |
| 3943 |
formatter.field("default", Print::ref_cast(val)); |
| 3944 |
} |
| 3945 |
if _val.semi_token.is_some() { |
| 3946 |
formatter.field("semi_token", &Present); |
| 3947 |
} |
| 3948 |
formatter.finish() |
| 3949 |
} |
| 3950 |
syn::TraitItem::Type(_val) => { |
| 3951 |
let mut formatter = formatter.debug_struct("TraitItem::Type"); |
| 3952 |
if !_val.attrs.is_empty() { |
| 3953 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3954 |
} |
| 3955 |
formatter.field("ident", Lite(&_val.ident)); |
| 3956 |
formatter.field("generics", Lite(&_val.generics)); |
| 3957 |
if _val.colon_token.is_some() { |
| 3958 |
formatter.field("colon_token", &Present); |
| 3959 |
} |
| 3960 |
if !_val.bounds.is_empty() { |
| 3961 |
formatter.field("bounds", Lite(&_val.bounds)); |
| 3962 |
} |
| 3963 |
if let Some(val) = &_val.default { |
| 3964 |
#[derive(RefCast)] |
| 3965 |
#[repr(transparent)] |
| 3966 |
struct Print((syn::token::Eq, syn::Type)); |
| 3967 |
impl Debug for Print { |
| 3968 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 3969 |
formatter.write_str("Some(")?; |
| 3970 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 3971 |
formatter.write_str(")")?; |
| 3972 |
Ok(()) |
| 3973 |
} |
| 3974 |
} |
| 3975 |
formatter.field("default", Print::ref_cast(val)); |
| 3976 |
} |
| 3977 |
formatter.finish() |
| 3978 |
} |
| 3979 |
syn::TraitItem::Macro(_val) => { |
| 3980 |
let mut formatter = formatter.debug_struct("TraitItem::Macro"); |
| 3981 |
if !_val.attrs.is_empty() { |
| 3982 |
formatter.field("attrs", Lite(&_val.attrs)); |
| 3983 |
} |
| 3984 |
formatter.field("mac", Lite(&_val.mac)); |
| 3985 |
if _val.semi_token.is_some() { |
| 3986 |
formatter.field("semi_token", &Present); |
| 3987 |
} |
| 3988 |
formatter.finish() |
| 3989 |
} |
| 3990 |
syn::TraitItem::Verbatim(_val) => { |
| 3991 |
formatter.write_str("TraitItem::Verbatim")?; |
| 3992 |
formatter.write_str("(`")?; |
| 3993 |
Display::fmt(_val, formatter)?; |
| 3994 |
formatter.write_str("`)")?; |
| 3995 |
Ok(()) |
| 3996 |
} |
| 3997 |
_ => unreachable!(), |
| 3998 |
} |
| 3999 |
} |
| 4000 |
} |
| 4001 |
impl Debug for Lite<syn::TraitItemConst> { |
| 4002 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4003 |
let mut formatter = formatter.debug_struct("TraitItemConst"); |
| 4004 |
if !self.value.attrs.is_empty() { |
| 4005 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4006 |
} |
| 4007 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4008 |
formatter.field("generics", Lite(&self.value.generics)); |
| 4009 |
formatter.field("ty", Lite(&self.value.ty)); |
| 4010 |
if let Some(val) = &self.value.default { |
| 4011 |
#[derive(RefCast)] |
| 4012 |
#[repr(transparent)] |
| 4013 |
struct Print((syn::token::Eq, syn::Expr)); |
| 4014 |
impl Debug for Print { |
| 4015 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4016 |
formatter.write_str("Some(")?; |
| 4017 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 4018 |
formatter.write_str(")")?; |
| 4019 |
Ok(()) |
| 4020 |
} |
| 4021 |
} |
| 4022 |
formatter.field("default", Print::ref_cast(val)); |
| 4023 |
} |
| 4024 |
formatter.finish() |
| 4025 |
} |
| 4026 |
} |
| 4027 |
impl Debug for Lite<syn::TraitItemFn> { |
| 4028 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4029 |
let mut formatter = formatter.debug_struct("TraitItemFn"); |
| 4030 |
if !self.value.attrs.is_empty() { |
| 4031 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4032 |
} |
| 4033 |
formatter.field("sig", Lite(&self.value.sig)); |
| 4034 |
if let Some(val) = &self.value.default { |
| 4035 |
#[derive(RefCast)] |
| 4036 |
#[repr(transparent)] |
| 4037 |
struct Print(syn::Block); |
| 4038 |
impl Debug for Print { |
| 4039 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4040 |
formatter.write_str("Some(")?; |
| 4041 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4042 |
formatter.write_str(")")?; |
| 4043 |
Ok(()) |
| 4044 |
} |
| 4045 |
} |
| 4046 |
formatter.field("default", Print::ref_cast(val)); |
| 4047 |
} |
| 4048 |
if self.value.semi_token.is_some() { |
| 4049 |
formatter.field("semi_token", &Present); |
| 4050 |
} |
| 4051 |
formatter.finish() |
| 4052 |
} |
| 4053 |
} |
| 4054 |
impl Debug for Lite<syn::TraitItemMacro> { |
| 4055 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4056 |
let mut formatter = formatter.debug_struct("TraitItemMacro"); |
| 4057 |
if !self.value.attrs.is_empty() { |
| 4058 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4059 |
} |
| 4060 |
formatter.field("mac", Lite(&self.value.mac)); |
| 4061 |
if self.value.semi_token.is_some() { |
| 4062 |
formatter.field("semi_token", &Present); |
| 4063 |
} |
| 4064 |
formatter.finish() |
| 4065 |
} |
| 4066 |
} |
| 4067 |
impl Debug for Lite<syn::TraitItemType> { |
| 4068 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4069 |
let mut formatter = formatter.debug_struct("TraitItemType"); |
| 4070 |
if !self.value.attrs.is_empty() { |
| 4071 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4072 |
} |
| 4073 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4074 |
formatter.field("generics", Lite(&self.value.generics)); |
| 4075 |
if self.value.colon_token.is_some() { |
| 4076 |
formatter.field("colon_token", &Present); |
| 4077 |
} |
| 4078 |
if !self.value.bounds.is_empty() { |
| 4079 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 4080 |
} |
| 4081 |
if let Some(val) = &self.value.default { |
| 4082 |
#[derive(RefCast)] |
| 4083 |
#[repr(transparent)] |
| 4084 |
struct Print((syn::token::Eq, syn::Type)); |
| 4085 |
impl Debug for Print { |
| 4086 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4087 |
formatter.write_str("Some(")?; |
| 4088 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 4089 |
formatter.write_str(")")?; |
| 4090 |
Ok(()) |
| 4091 |
} |
| 4092 |
} |
| 4093 |
formatter.field("default", Print::ref_cast(val)); |
| 4094 |
} |
| 4095 |
formatter.finish() |
| 4096 |
} |
| 4097 |
} |
| 4098 |
impl Debug for Lite<syn::Type> { |
| 4099 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4100 |
match &self.value { |
| 4101 |
syn::Type::Array(_val) => { |
| 4102 |
let mut formatter = formatter.debug_struct("Type::Array"); |
| 4103 |
formatter.field("elem", Lite(&_val.elem)); |
| 4104 |
formatter.field("len", Lite(&_val.len)); |
| 4105 |
formatter.finish() |
| 4106 |
} |
| 4107 |
syn::Type::BareFn(_val) => { |
| 4108 |
let mut formatter = formatter.debug_struct("Type::BareFn"); |
| 4109 |
if let Some(val) = &_val.lifetimes { |
| 4110 |
#[derive(RefCast)] |
| 4111 |
#[repr(transparent)] |
| 4112 |
struct Print(syn::BoundLifetimes); |
| 4113 |
impl Debug for Print { |
| 4114 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4115 |
formatter.write_str("Some(")?; |
| 4116 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4117 |
formatter.write_str(")")?; |
| 4118 |
Ok(()) |
| 4119 |
} |
| 4120 |
} |
| 4121 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 4122 |
} |
| 4123 |
if _val.unsafety.is_some() { |
| 4124 |
formatter.field("unsafety", &Present); |
| 4125 |
} |
| 4126 |
if let Some(val) = &_val.abi { |
| 4127 |
#[derive(RefCast)] |
| 4128 |
#[repr(transparent)] |
| 4129 |
struct Print(syn::Abi); |
| 4130 |
impl Debug for Print { |
| 4131 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4132 |
formatter.write_str("Some(")?; |
| 4133 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4134 |
formatter.write_str(")")?; |
| 4135 |
Ok(()) |
| 4136 |
} |
| 4137 |
} |
| 4138 |
formatter.field("abi", Print::ref_cast(val)); |
| 4139 |
} |
| 4140 |
if !_val.inputs.is_empty() { |
| 4141 |
formatter.field("inputs", Lite(&_val.inputs)); |
| 4142 |
} |
| 4143 |
if let Some(val) = &_val.variadic { |
| 4144 |
#[derive(RefCast)] |
| 4145 |
#[repr(transparent)] |
| 4146 |
struct Print(syn::BareVariadic); |
| 4147 |
impl Debug for Print { |
| 4148 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4149 |
formatter.write_str("Some(")?; |
| 4150 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4151 |
formatter.write_str(")")?; |
| 4152 |
Ok(()) |
| 4153 |
} |
| 4154 |
} |
| 4155 |
formatter.field("variadic", Print::ref_cast(val)); |
| 4156 |
} |
| 4157 |
formatter.field("output", Lite(&_val.output)); |
| 4158 |
formatter.finish() |
| 4159 |
} |
| 4160 |
syn::Type::Group(_val) => { |
| 4161 |
let mut formatter = formatter.debug_struct("Type::Group"); |
| 4162 |
formatter.field("elem", Lite(&_val.elem)); |
| 4163 |
formatter.finish() |
| 4164 |
} |
| 4165 |
syn::Type::ImplTrait(_val) => { |
| 4166 |
let mut formatter = formatter.debug_struct("Type::ImplTrait"); |
| 4167 |
if !_val.bounds.is_empty() { |
| 4168 |
formatter.field("bounds", Lite(&_val.bounds)); |
| 4169 |
} |
| 4170 |
formatter.finish() |
| 4171 |
} |
| 4172 |
syn::Type::Infer(_val) => { |
| 4173 |
let mut formatter = formatter.debug_struct("Type::Infer"); |
| 4174 |
formatter.finish() |
| 4175 |
} |
| 4176 |
syn::Type::Macro(_val) => { |
| 4177 |
let mut formatter = formatter.debug_struct("Type::Macro"); |
| 4178 |
formatter.field("mac", Lite(&_val.mac)); |
| 4179 |
formatter.finish() |
| 4180 |
} |
| 4181 |
syn::Type::Never(_val) => { |
| 4182 |
let mut formatter = formatter.debug_struct("Type::Never"); |
| 4183 |
formatter.finish() |
| 4184 |
} |
| 4185 |
syn::Type::Paren(_val) => { |
| 4186 |
let mut formatter = formatter.debug_struct("Type::Paren"); |
| 4187 |
formatter.field("elem", Lite(&_val.elem)); |
| 4188 |
formatter.finish() |
| 4189 |
} |
| 4190 |
syn::Type::Path(_val) => { |
| 4191 |
let mut formatter = formatter.debug_struct("Type::Path"); |
| 4192 |
if let Some(val) = &_val.qself { |
| 4193 |
#[derive(RefCast)] |
| 4194 |
#[repr(transparent)] |
| 4195 |
struct Print(syn::QSelf); |
| 4196 |
impl Debug for Print { |
| 4197 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4198 |
formatter.write_str("Some(")?; |
| 4199 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4200 |
formatter.write_str(")")?; |
| 4201 |
Ok(()) |
| 4202 |
} |
| 4203 |
} |
| 4204 |
formatter.field("qself", Print::ref_cast(val)); |
| 4205 |
} |
| 4206 |
formatter.field("path", Lite(&_val.path)); |
| 4207 |
formatter.finish() |
| 4208 |
} |
| 4209 |
syn::Type::Ptr(_val) => { |
| 4210 |
let mut formatter = formatter.debug_struct("Type::Ptr"); |
| 4211 |
if _val.const_token.is_some() { |
| 4212 |
formatter.field("const_token", &Present); |
| 4213 |
} |
| 4214 |
if _val.mutability.is_some() { |
| 4215 |
formatter.field("mutability", &Present); |
| 4216 |
} |
| 4217 |
formatter.field("elem", Lite(&_val.elem)); |
| 4218 |
formatter.finish() |
| 4219 |
} |
| 4220 |
syn::Type::Reference(_val) => { |
| 4221 |
let mut formatter = formatter.debug_struct("Type::Reference"); |
| 4222 |
if let Some(val) = &_val.lifetime { |
| 4223 |
#[derive(RefCast)] |
| 4224 |
#[repr(transparent)] |
| 4225 |
struct Print(syn::Lifetime); |
| 4226 |
impl Debug for Print { |
| 4227 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4228 |
formatter.write_str("Some(")?; |
| 4229 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4230 |
formatter.write_str(")")?; |
| 4231 |
Ok(()) |
| 4232 |
} |
| 4233 |
} |
| 4234 |
formatter.field("lifetime", Print::ref_cast(val)); |
| 4235 |
} |
| 4236 |
if _val.mutability.is_some() { |
| 4237 |
formatter.field("mutability", &Present); |
| 4238 |
} |
| 4239 |
formatter.field("elem", Lite(&_val.elem)); |
| 4240 |
formatter.finish() |
| 4241 |
} |
| 4242 |
syn::Type::Slice(_val) => { |
| 4243 |
let mut formatter = formatter.debug_struct("Type::Slice"); |
| 4244 |
formatter.field("elem", Lite(&_val.elem)); |
| 4245 |
formatter.finish() |
| 4246 |
} |
| 4247 |
syn::Type::TraitObject(_val) => { |
| 4248 |
let mut formatter = formatter.debug_struct("Type::TraitObject"); |
| 4249 |
if _val.dyn_token.is_some() { |
| 4250 |
formatter.field("dyn_token", &Present); |
| 4251 |
} |
| 4252 |
if !_val.bounds.is_empty() { |
| 4253 |
formatter.field("bounds", Lite(&_val.bounds)); |
| 4254 |
} |
| 4255 |
formatter.finish() |
| 4256 |
} |
| 4257 |
syn::Type::Tuple(_val) => { |
| 4258 |
let mut formatter = formatter.debug_struct("Type::Tuple"); |
| 4259 |
if !_val.elems.is_empty() { |
| 4260 |
formatter.field("elems", Lite(&_val.elems)); |
| 4261 |
} |
| 4262 |
formatter.finish() |
| 4263 |
} |
| 4264 |
syn::Type::Verbatim(_val) => { |
| 4265 |
formatter.write_str("Type::Verbatim")?; |
| 4266 |
formatter.write_str("(`")?; |
| 4267 |
Display::fmt(_val, formatter)?; |
| 4268 |
formatter.write_str("`)")?; |
| 4269 |
Ok(()) |
| 4270 |
} |
| 4271 |
_ => unreachable!(), |
| 4272 |
} |
| 4273 |
} |
| 4274 |
} |
| 4275 |
impl Debug for Lite<syn::TypeArray> { |
| 4276 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4277 |
let mut formatter = formatter.debug_struct("TypeArray"); |
| 4278 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4279 |
formatter.field("len", Lite(&self.value.len)); |
| 4280 |
formatter.finish() |
| 4281 |
} |
| 4282 |
} |
| 4283 |
impl Debug for Lite<syn::TypeBareFn> { |
| 4284 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4285 |
let mut formatter = formatter.debug_struct("TypeBareFn"); |
| 4286 |
if let Some(val) = &self.value.lifetimes { |
| 4287 |
#[derive(RefCast)] |
| 4288 |
#[repr(transparent)] |
| 4289 |
struct Print(syn::BoundLifetimes); |
| 4290 |
impl Debug for Print { |
| 4291 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4292 |
formatter.write_str("Some(")?; |
| 4293 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4294 |
formatter.write_str(")")?; |
| 4295 |
Ok(()) |
| 4296 |
} |
| 4297 |
} |
| 4298 |
formatter.field("lifetimes", Print::ref_cast(val)); |
| 4299 |
} |
| 4300 |
if self.value.unsafety.is_some() { |
| 4301 |
formatter.field("unsafety", &Present); |
| 4302 |
} |
| 4303 |
if let Some(val) = &self.value.abi { |
| 4304 |
#[derive(RefCast)] |
| 4305 |
#[repr(transparent)] |
| 4306 |
struct Print(syn::Abi); |
| 4307 |
impl Debug for Print { |
| 4308 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4309 |
formatter.write_str("Some(")?; |
| 4310 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4311 |
formatter.write_str(")")?; |
| 4312 |
Ok(()) |
| 4313 |
} |
| 4314 |
} |
| 4315 |
formatter.field("abi", Print::ref_cast(val)); |
| 4316 |
} |
| 4317 |
if !self.value.inputs.is_empty() { |
| 4318 |
formatter.field("inputs", Lite(&self.value.inputs)); |
| 4319 |
} |
| 4320 |
if let Some(val) = &self.value.variadic { |
| 4321 |
#[derive(RefCast)] |
| 4322 |
#[repr(transparent)] |
| 4323 |
struct Print(syn::BareVariadic); |
| 4324 |
impl Debug for Print { |
| 4325 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4326 |
formatter.write_str("Some(")?; |
| 4327 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4328 |
formatter.write_str(")")?; |
| 4329 |
Ok(()) |
| 4330 |
} |
| 4331 |
} |
| 4332 |
formatter.field("variadic", Print::ref_cast(val)); |
| 4333 |
} |
| 4334 |
formatter.field("output", Lite(&self.value.output)); |
| 4335 |
formatter.finish() |
| 4336 |
} |
| 4337 |
} |
| 4338 |
impl Debug for Lite<syn::TypeGroup> { |
| 4339 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4340 |
let mut formatter = formatter.debug_struct("TypeGroup"); |
| 4341 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4342 |
formatter.finish() |
| 4343 |
} |
| 4344 |
} |
| 4345 |
impl Debug for Lite<syn::TypeImplTrait> { |
| 4346 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4347 |
let mut formatter = formatter.debug_struct("TypeImplTrait"); |
| 4348 |
if !self.value.bounds.is_empty() { |
| 4349 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 4350 |
} |
| 4351 |
formatter.finish() |
| 4352 |
} |
| 4353 |
} |
| 4354 |
impl Debug for Lite<syn::TypeInfer> { |
| 4355 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4356 |
let mut formatter = formatter.debug_struct("TypeInfer"); |
| 4357 |
formatter.finish() |
| 4358 |
} |
| 4359 |
} |
| 4360 |
impl Debug for Lite<syn::TypeMacro> { |
| 4361 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4362 |
let mut formatter = formatter.debug_struct("TypeMacro"); |
| 4363 |
formatter.field("mac", Lite(&self.value.mac)); |
| 4364 |
formatter.finish() |
| 4365 |
} |
| 4366 |
} |
| 4367 |
impl Debug for Lite<syn::TypeNever> { |
| 4368 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4369 |
let mut formatter = formatter.debug_struct("TypeNever"); |
| 4370 |
formatter.finish() |
| 4371 |
} |
| 4372 |
} |
| 4373 |
impl Debug for Lite<syn::TypeParam> { |
| 4374 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4375 |
let mut formatter = formatter.debug_struct("TypeParam"); |
| 4376 |
if !self.value.attrs.is_empty() { |
| 4377 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4378 |
} |
| 4379 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4380 |
if self.value.colon_token.is_some() { |
| 4381 |
formatter.field("colon_token", &Present); |
| 4382 |
} |
| 4383 |
if !self.value.bounds.is_empty() { |
| 4384 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 4385 |
} |
| 4386 |
if self.value.eq_token.is_some() { |
| 4387 |
formatter.field("eq_token", &Present); |
| 4388 |
} |
| 4389 |
if let Some(val) = &self.value.default { |
| 4390 |
#[derive(RefCast)] |
| 4391 |
#[repr(transparent)] |
| 4392 |
struct Print(syn::Type); |
| 4393 |
impl Debug for Print { |
| 4394 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4395 |
formatter.write_str("Some(")?; |
| 4396 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4397 |
formatter.write_str(")")?; |
| 4398 |
Ok(()) |
| 4399 |
} |
| 4400 |
} |
| 4401 |
formatter.field("default", Print::ref_cast(val)); |
| 4402 |
} |
| 4403 |
formatter.finish() |
| 4404 |
} |
| 4405 |
} |
| 4406 |
impl Debug for Lite<syn::TypeParamBound> { |
| 4407 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4408 |
match &self.value { |
| 4409 |
syn::TypeParamBound::Trait(_val) => { |
| 4410 |
formatter.write_str("TypeParamBound::Trait")?; |
| 4411 |
formatter.write_str("(")?; |
| 4412 |
Debug::fmt(Lite(_val), formatter)?; |
| 4413 |
formatter.write_str(")")?; |
| 4414 |
Ok(()) |
| 4415 |
} |
| 4416 |
syn::TypeParamBound::Lifetime(_val) => { |
| 4417 |
let mut formatter = formatter.debug_struct("TypeParamBound::Lifetime"); |
| 4418 |
formatter.field("ident", Lite(&_val.ident)); |
| 4419 |
formatter.finish() |
| 4420 |
} |
| 4421 |
syn::TypeParamBound::PreciseCapture(_val) => { |
| 4422 |
formatter.write_str("TypeParamBound::PreciseCapture")?; |
| 4423 |
formatter.write_str("(")?; |
| 4424 |
Debug::fmt(Lite(_val), formatter)?; |
| 4425 |
formatter.write_str(")")?; |
| 4426 |
Ok(()) |
| 4427 |
} |
| 4428 |
syn::TypeParamBound::Verbatim(_val) => { |
| 4429 |
formatter.write_str("TypeParamBound::Verbatim")?; |
| 4430 |
formatter.write_str("(`")?; |
| 4431 |
Display::fmt(_val, formatter)?; |
| 4432 |
formatter.write_str("`)")?; |
| 4433 |
Ok(()) |
| 4434 |
} |
| 4435 |
_ => unreachable!(), |
| 4436 |
} |
| 4437 |
} |
| 4438 |
} |
| 4439 |
impl Debug for Lite<syn::TypeParen> { |
| 4440 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4441 |
let mut formatter = formatter.debug_struct("TypeParen"); |
| 4442 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4443 |
formatter.finish() |
| 4444 |
} |
| 4445 |
} |
| 4446 |
impl Debug for Lite<syn::TypePath> { |
| 4447 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4448 |
let mut formatter = formatter.debug_struct("TypePath"); |
| 4449 |
if let Some(val) = &self.value.qself { |
| 4450 |
#[derive(RefCast)] |
| 4451 |
#[repr(transparent)] |
| 4452 |
struct Print(syn::QSelf); |
| 4453 |
impl Debug for Print { |
| 4454 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4455 |
formatter.write_str("Some(")?; |
| 4456 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4457 |
formatter.write_str(")")?; |
| 4458 |
Ok(()) |
| 4459 |
} |
| 4460 |
} |
| 4461 |
formatter.field("qself", Print::ref_cast(val)); |
| 4462 |
} |
| 4463 |
formatter.field("path", Lite(&self.value.path)); |
| 4464 |
formatter.finish() |
| 4465 |
} |
| 4466 |
} |
| 4467 |
impl Debug for Lite<syn::TypePtr> { |
| 4468 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4469 |
let mut formatter = formatter.debug_struct("TypePtr"); |
| 4470 |
if self.value.const_token.is_some() { |
| 4471 |
formatter.field("const_token", &Present); |
| 4472 |
} |
| 4473 |
if self.value.mutability.is_some() { |
| 4474 |
formatter.field("mutability", &Present); |
| 4475 |
} |
| 4476 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4477 |
formatter.finish() |
| 4478 |
} |
| 4479 |
} |
| 4480 |
impl Debug for Lite<syn::TypeReference> { |
| 4481 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4482 |
let mut formatter = formatter.debug_struct("TypeReference"); |
| 4483 |
if let Some(val) = &self.value.lifetime { |
| 4484 |
#[derive(RefCast)] |
| 4485 |
#[repr(transparent)] |
| 4486 |
struct Print(syn::Lifetime); |
| 4487 |
impl Debug for Print { |
| 4488 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4489 |
formatter.write_str("Some(")?; |
| 4490 |
Debug::fmt(Lite(&self.0), formatter)?; |
| 4491 |
formatter.write_str(")")?; |
| 4492 |
Ok(()) |
| 4493 |
} |
| 4494 |
} |
| 4495 |
formatter.field("lifetime", Print::ref_cast(val)); |
| 4496 |
} |
| 4497 |
if self.value.mutability.is_some() { |
| 4498 |
formatter.field("mutability", &Present); |
| 4499 |
} |
| 4500 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4501 |
formatter.finish() |
| 4502 |
} |
| 4503 |
} |
| 4504 |
impl Debug for Lite<syn::TypeSlice> { |
| 4505 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4506 |
let mut formatter = formatter.debug_struct("TypeSlice"); |
| 4507 |
formatter.field("elem", Lite(&self.value.elem)); |
| 4508 |
formatter.finish() |
| 4509 |
} |
| 4510 |
} |
| 4511 |
impl Debug for Lite<syn::TypeTraitObject> { |
| 4512 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4513 |
let mut formatter = formatter.debug_struct("TypeTraitObject"); |
| 4514 |
if self.value.dyn_token.is_some() { |
| 4515 |
formatter.field("dyn_token", &Present); |
| 4516 |
} |
| 4517 |
if !self.value.bounds.is_empty() { |
| 4518 |
formatter.field("bounds", Lite(&self.value.bounds)); |
| 4519 |
} |
| 4520 |
formatter.finish() |
| 4521 |
} |
| 4522 |
} |
| 4523 |
impl Debug for Lite<syn::TypeTuple> { |
| 4524 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4525 |
let mut formatter = formatter.debug_struct("TypeTuple"); |
| 4526 |
if !self.value.elems.is_empty() { |
| 4527 |
formatter.field("elems", Lite(&self.value.elems)); |
| 4528 |
} |
| 4529 |
formatter.finish() |
| 4530 |
} |
| 4531 |
} |
| 4532 |
impl Debug for Lite<syn::UnOp> { |
| 4533 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4534 |
match &self.value { |
| 4535 |
syn::UnOp::Deref(_val) => { |
| 4536 |
formatter.write_str("UnOp::Deref")?; |
| 4537 |
Ok(()) |
| 4538 |
} |
| 4539 |
syn::UnOp::Not(_val) => { |
| 4540 |
formatter.write_str("UnOp::Not")?; |
| 4541 |
Ok(()) |
| 4542 |
} |
| 4543 |
syn::UnOp::Neg(_val) => { |
| 4544 |
formatter.write_str("UnOp::Neg")?; |
| 4545 |
Ok(()) |
| 4546 |
} |
| 4547 |
_ => unreachable!(), |
| 4548 |
} |
| 4549 |
} |
| 4550 |
} |
| 4551 |
impl Debug for Lite<syn::UseGlob> { |
| 4552 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4553 |
let mut formatter = formatter.debug_struct("UseGlob"); |
| 4554 |
formatter.finish() |
| 4555 |
} |
| 4556 |
} |
| 4557 |
impl Debug for Lite<syn::UseGroup> { |
| 4558 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4559 |
let mut formatter = formatter.debug_struct("UseGroup"); |
| 4560 |
if !self.value.items.is_empty() { |
| 4561 |
formatter.field("items", Lite(&self.value.items)); |
| 4562 |
} |
| 4563 |
formatter.finish() |
| 4564 |
} |
| 4565 |
} |
| 4566 |
impl Debug for Lite<syn::UseName> { |
| 4567 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4568 |
let mut formatter = formatter.debug_struct("UseName"); |
| 4569 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4570 |
formatter.finish() |
| 4571 |
} |
| 4572 |
} |
| 4573 |
impl Debug for Lite<syn::UsePath> { |
| 4574 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4575 |
let mut formatter = formatter.debug_struct("UsePath"); |
| 4576 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4577 |
formatter.field("tree", Lite(&self.value.tree)); |
| 4578 |
formatter.finish() |
| 4579 |
} |
| 4580 |
} |
| 4581 |
impl Debug for Lite<syn::UseRename> { |
| 4582 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4583 |
let mut formatter = formatter.debug_struct("UseRename"); |
| 4584 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4585 |
formatter.field("rename", Lite(&self.value.rename)); |
| 4586 |
formatter.finish() |
| 4587 |
} |
| 4588 |
} |
| 4589 |
impl Debug for Lite<syn::UseTree> { |
| 4590 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4591 |
match &self.value { |
| 4592 |
syn::UseTree::Path(_val) => { |
| 4593 |
formatter.write_str("UseTree::Path")?; |
| 4594 |
formatter.write_str("(")?; |
| 4595 |
Debug::fmt(Lite(_val), formatter)?; |
| 4596 |
formatter.write_str(")")?; |
| 4597 |
Ok(()) |
| 4598 |
} |
| 4599 |
syn::UseTree::Name(_val) => { |
| 4600 |
formatter.write_str("UseTree::Name")?; |
| 4601 |
formatter.write_str("(")?; |
| 4602 |
Debug::fmt(Lite(_val), formatter)?; |
| 4603 |
formatter.write_str(")")?; |
| 4604 |
Ok(()) |
| 4605 |
} |
| 4606 |
syn::UseTree::Rename(_val) => { |
| 4607 |
formatter.write_str("UseTree::Rename")?; |
| 4608 |
formatter.write_str("(")?; |
| 4609 |
Debug::fmt(Lite(_val), formatter)?; |
| 4610 |
formatter.write_str(")")?; |
| 4611 |
Ok(()) |
| 4612 |
} |
| 4613 |
syn::UseTree::Glob(_val) => { |
| 4614 |
formatter.write_str("UseTree::Glob")?; |
| 4615 |
formatter.write_str("(")?; |
| 4616 |
Debug::fmt(Lite(_val), formatter)?; |
| 4617 |
formatter.write_str(")")?; |
| 4618 |
Ok(()) |
| 4619 |
} |
| 4620 |
syn::UseTree::Group(_val) => { |
| 4621 |
formatter.write_str("UseTree::Group")?; |
| 4622 |
formatter.write_str("(")?; |
| 4623 |
Debug::fmt(Lite(_val), formatter)?; |
| 4624 |
formatter.write_str(")")?; |
| 4625 |
Ok(()) |
| 4626 |
} |
| 4627 |
} |
| 4628 |
} |
| 4629 |
} |
| 4630 |
impl Debug for Lite<syn::Variadic> { |
| 4631 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4632 |
let mut formatter = formatter.debug_struct("Variadic"); |
| 4633 |
if !self.value.attrs.is_empty() { |
| 4634 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4635 |
} |
| 4636 |
if let Some(val) = &self.value.pat { |
| 4637 |
#[derive(RefCast)] |
| 4638 |
#[repr(transparent)] |
| 4639 |
struct Print((Box<syn::Pat>, syn::token::Colon)); |
| 4640 |
impl Debug for Print { |
| 4641 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4642 |
formatter.write_str("Some(")?; |
| 4643 |
Debug::fmt(Lite(&self.0.0), formatter)?; |
| 4644 |
formatter.write_str(")")?; |
| 4645 |
Ok(()) |
| 4646 |
} |
| 4647 |
} |
| 4648 |
formatter.field("pat", Print::ref_cast(val)); |
| 4649 |
} |
| 4650 |
if self.value.comma.is_some() { |
| 4651 |
formatter.field("comma", &Present); |
| 4652 |
} |
| 4653 |
formatter.finish() |
| 4654 |
} |
| 4655 |
} |
| 4656 |
impl Debug for Lite<syn::Variant> { |
| 4657 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4658 |
let mut formatter = formatter.debug_struct("Variant"); |
| 4659 |
if !self.value.attrs.is_empty() { |
| 4660 |
formatter.field("attrs", Lite(&self.value.attrs)); |
| 4661 |
} |
| 4662 |
formatter.field("ident", Lite(&self.value.ident)); |
| 4663 |
formatter.field("fields", Lite(&self.value.fields)); |
| 4664 |
if let Some(val) = &self.value.discriminant { |
| 4665 |
#[derive(RefCast)] |
| 4666 |
#[repr(transparent)] |
| 4667 |
struct Print((syn::token::Eq, syn::Expr)); |
| 4668 |
impl Debug for Print { |
| 4669 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4670 |
formatter.write_str("Some(")?; |
| 4671 |
Debug::fmt(Lite(&self.0.1), formatter)?; |
| 4672 |
formatter.write_str(")")?; |
| 4673 |
Ok(()) |
| 4674 |
} |
| 4675 |
} |
| 4676 |
formatter.field("discriminant", Print::ref_cast(val)); |
| 4677 |
} |
| 4678 |
formatter.finish() |
| 4679 |
} |
| 4680 |
} |
| 4681 |
impl Debug for Lite<syn::VisRestricted> { |
| 4682 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4683 |
let mut formatter = formatter.debug_struct("VisRestricted"); |
| 4684 |
if self.value.in_token.is_some() { |
| 4685 |
formatter.field("in_token", &Present); |
| 4686 |
} |
| 4687 |
formatter.field("path", Lite(&self.value.path)); |
| 4688 |
formatter.finish() |
| 4689 |
} |
| 4690 |
} |
| 4691 |
impl Debug for Lite<syn::Visibility> { |
| 4692 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4693 |
match &self.value { |
| 4694 |
syn::Visibility::Public(_val) => { |
| 4695 |
formatter.write_str("Visibility::Public")?; |
| 4696 |
Ok(()) |
| 4697 |
} |
| 4698 |
syn::Visibility::Restricted(_val) => { |
| 4699 |
let mut formatter = formatter.debug_struct("Visibility::Restricted"); |
| 4700 |
if _val.in_token.is_some() { |
| 4701 |
formatter.field("in_token", &Present); |
| 4702 |
} |
| 4703 |
formatter.field("path", Lite(&_val.path)); |
| 4704 |
formatter.finish() |
| 4705 |
} |
| 4706 |
syn::Visibility::Inherited => formatter.write_str("Visibility::Inherited"), |
| 4707 |
} |
| 4708 |
} |
| 4709 |
} |
| 4710 |
impl Debug for Lite<syn::WhereClause> { |
| 4711 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4712 |
let mut formatter = formatter.debug_struct("WhereClause"); |
| 4713 |
if !self.value.predicates.is_empty() { |
| 4714 |
formatter.field("predicates", Lite(&self.value.predicates)); |
| 4715 |
} |
| 4716 |
formatter.finish() |
| 4717 |
} |
| 4718 |
} |
| 4719 |
impl Debug for Lite<syn::WherePredicate> { |
| 4720 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4721 |
match &self.value { |
| 4722 |
syn::WherePredicate::Lifetime(_val) => { |
| 4723 |
formatter.write_str("WherePredicate::Lifetime")?; |
| 4724 |
formatter.write_str("(")?; |
| 4725 |
Debug::fmt(Lite(_val), formatter)?; |
| 4726 |
formatter.write_str(")")?; |
| 4727 |
Ok(()) |
| 4728 |
} |
| 4729 |
syn::WherePredicate::Type(_val) => { |
| 4730 |
formatter.write_str("WherePredicate::Type")?; |
| 4731 |
formatter.write_str("(")?; |
| 4732 |
Debug::fmt(Lite(_val), formatter)?; |
| 4733 |
formatter.write_str(")")?; |
| 4734 |
Ok(()) |
| 4735 |
} |
| 4736 |
_ => unreachable!(), |
| 4737 |
} |
| 4738 |
} |
| 4739 |
} |
| 4740 |
impl Debug for Lite<syn::token::Abstract> { |
| 4741 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4742 |
formatter.write_str("Token![abstract]") |
| 4743 |
} |
| 4744 |
} |
| 4745 |
impl Debug for Lite<syn::token::And> { |
| 4746 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4747 |
formatter.write_str("Token![&]") |
| 4748 |
} |
| 4749 |
} |
| 4750 |
impl Debug for Lite<syn::token::AndAnd> { |
| 4751 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4752 |
formatter.write_str("Token![&&]") |
| 4753 |
} |
| 4754 |
} |
| 4755 |
impl Debug for Lite<syn::token::AndEq> { |
| 4756 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4757 |
formatter.write_str("Token![&=]") |
| 4758 |
} |
| 4759 |
} |
| 4760 |
impl Debug for Lite<syn::token::As> { |
| 4761 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4762 |
formatter.write_str("Token![as]") |
| 4763 |
} |
| 4764 |
} |
| 4765 |
impl Debug for Lite<syn::token::Async> { |
| 4766 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4767 |
formatter.write_str("Token![async]") |
| 4768 |
} |
| 4769 |
} |
| 4770 |
impl Debug for Lite<syn::token::At> { |
| 4771 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4772 |
formatter.write_str("Token![@]") |
| 4773 |
} |
| 4774 |
} |
| 4775 |
impl Debug for Lite<syn::token::Auto> { |
| 4776 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4777 |
formatter.write_str("Token![auto]") |
| 4778 |
} |
| 4779 |
} |
| 4780 |
impl Debug for Lite<syn::token::Await> { |
| 4781 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4782 |
formatter.write_str("Token![await]") |
| 4783 |
} |
| 4784 |
} |
| 4785 |
impl Debug for Lite<syn::token::Become> { |
| 4786 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4787 |
formatter.write_str("Token![become]") |
| 4788 |
} |
| 4789 |
} |
| 4790 |
impl Debug for Lite<syn::token::Box> { |
| 4791 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4792 |
formatter.write_str("Token![box]") |
| 4793 |
} |
| 4794 |
} |
| 4795 |
impl Debug for Lite<syn::token::Break> { |
| 4796 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4797 |
formatter.write_str("Token![break]") |
| 4798 |
} |
| 4799 |
} |
| 4800 |
impl Debug for Lite<syn::token::Caret> { |
| 4801 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4802 |
formatter.write_str("Token![^]") |
| 4803 |
} |
| 4804 |
} |
| 4805 |
impl Debug for Lite<syn::token::CaretEq> { |
| 4806 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4807 |
formatter.write_str("Token![^=]") |
| 4808 |
} |
| 4809 |
} |
| 4810 |
impl Debug for Lite<syn::token::Colon> { |
| 4811 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4812 |
formatter.write_str("Token![:]") |
| 4813 |
} |
| 4814 |
} |
| 4815 |
impl Debug for Lite<syn::token::Comma> { |
| 4816 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4817 |
formatter.write_str("Token![,]") |
| 4818 |
} |
| 4819 |
} |
| 4820 |
impl Debug for Lite<syn::token::Const> { |
| 4821 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4822 |
formatter.write_str("Token![const]") |
| 4823 |
} |
| 4824 |
} |
| 4825 |
impl Debug for Lite<syn::token::Continue> { |
| 4826 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4827 |
formatter.write_str("Token![continue]") |
| 4828 |
} |
| 4829 |
} |
| 4830 |
impl Debug for Lite<syn::token::Crate> { |
| 4831 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4832 |
formatter.write_str("Token![crate]") |
| 4833 |
} |
| 4834 |
} |
| 4835 |
impl Debug for Lite<syn::token::Default> { |
| 4836 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4837 |
formatter.write_str("Token![default]") |
| 4838 |
} |
| 4839 |
} |
| 4840 |
impl Debug for Lite<syn::token::Do> { |
| 4841 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4842 |
formatter.write_str("Token![do]") |
| 4843 |
} |
| 4844 |
} |
| 4845 |
impl Debug for Lite<syn::token::Dollar> { |
| 4846 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4847 |
formatter.write_str("Token![$]") |
| 4848 |
} |
| 4849 |
} |
| 4850 |
impl Debug for Lite<syn::token::Dot> { |
| 4851 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4852 |
formatter.write_str("Token![.]") |
| 4853 |
} |
| 4854 |
} |
| 4855 |
impl Debug for Lite<syn::token::DotDot> { |
| 4856 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4857 |
formatter.write_str("Token![..]") |
| 4858 |
} |
| 4859 |
} |
| 4860 |
impl Debug for Lite<syn::token::DotDotDot> { |
| 4861 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4862 |
formatter.write_str("Token![...]") |
| 4863 |
} |
| 4864 |
} |
| 4865 |
impl Debug for Lite<syn::token::DotDotEq> { |
| 4866 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4867 |
formatter.write_str("Token![..=]") |
| 4868 |
} |
| 4869 |
} |
| 4870 |
impl Debug for Lite<syn::token::Dyn> { |
| 4871 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4872 |
formatter.write_str("Token![dyn]") |
| 4873 |
} |
| 4874 |
} |
| 4875 |
impl Debug for Lite<syn::token::Else> { |
| 4876 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4877 |
formatter.write_str("Token![else]") |
| 4878 |
} |
| 4879 |
} |
| 4880 |
impl Debug for Lite<syn::token::Enum> { |
| 4881 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4882 |
formatter.write_str("Token![enum]") |
| 4883 |
} |
| 4884 |
} |
| 4885 |
impl Debug for Lite<syn::token::Eq> { |
| 4886 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4887 |
formatter.write_str("Token![=]") |
| 4888 |
} |
| 4889 |
} |
| 4890 |
impl Debug for Lite<syn::token::EqEq> { |
| 4891 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4892 |
formatter.write_str("Token![==]") |
| 4893 |
} |
| 4894 |
} |
| 4895 |
impl Debug for Lite<syn::token::Extern> { |
| 4896 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4897 |
formatter.write_str("Token![extern]") |
| 4898 |
} |
| 4899 |
} |
| 4900 |
impl Debug for Lite<syn::token::FatArrow> { |
| 4901 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4902 |
formatter.write_str("Token![=>]") |
| 4903 |
} |
| 4904 |
} |
| 4905 |
impl Debug for Lite<syn::token::Final> { |
| 4906 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4907 |
formatter.write_str("Token![final]") |
| 4908 |
} |
| 4909 |
} |
| 4910 |
impl Debug for Lite<syn::token::Fn> { |
| 4911 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4912 |
formatter.write_str("Token![fn]") |
| 4913 |
} |
| 4914 |
} |
| 4915 |
impl Debug for Lite<syn::token::For> { |
| 4916 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4917 |
formatter.write_str("Token![for]") |
| 4918 |
} |
| 4919 |
} |
| 4920 |
impl Debug for Lite<syn::token::Ge> { |
| 4921 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4922 |
formatter.write_str("Token![>=]") |
| 4923 |
} |
| 4924 |
} |
| 4925 |
impl Debug for Lite<syn::token::Gt> { |
| 4926 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4927 |
formatter.write_str("Token![>]") |
| 4928 |
} |
| 4929 |
} |
| 4930 |
impl Debug for Lite<syn::token::If> { |
| 4931 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4932 |
formatter.write_str("Token![if]") |
| 4933 |
} |
| 4934 |
} |
| 4935 |
impl Debug for Lite<syn::token::Impl> { |
| 4936 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4937 |
formatter.write_str("Token![impl]") |
| 4938 |
} |
| 4939 |
} |
| 4940 |
impl Debug for Lite<syn::token::In> { |
| 4941 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4942 |
formatter.write_str("Token![in]") |
| 4943 |
} |
| 4944 |
} |
| 4945 |
impl Debug for Lite<syn::token::LArrow> { |
| 4946 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4947 |
formatter.write_str("Token![<-]") |
| 4948 |
} |
| 4949 |
} |
| 4950 |
impl Debug for Lite<syn::token::Le> { |
| 4951 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4952 |
formatter.write_str("Token![<=]") |
| 4953 |
} |
| 4954 |
} |
| 4955 |
impl Debug for Lite<syn::token::Let> { |
| 4956 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4957 |
formatter.write_str("Token![let]") |
| 4958 |
} |
| 4959 |
} |
| 4960 |
impl Debug for Lite<syn::token::Loop> { |
| 4961 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4962 |
formatter.write_str("Token![loop]") |
| 4963 |
} |
| 4964 |
} |
| 4965 |
impl Debug for Lite<syn::token::Lt> { |
| 4966 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4967 |
formatter.write_str("Token![<]") |
| 4968 |
} |
| 4969 |
} |
| 4970 |
impl Debug for Lite<syn::token::Macro> { |
| 4971 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4972 |
formatter.write_str("Token![macro]") |
| 4973 |
} |
| 4974 |
} |
| 4975 |
impl Debug for Lite<syn::token::Match> { |
| 4976 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4977 |
formatter.write_str("Token![match]") |
| 4978 |
} |
| 4979 |
} |
| 4980 |
impl Debug for Lite<syn::token::Minus> { |
| 4981 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4982 |
formatter.write_str("Token![-]") |
| 4983 |
} |
| 4984 |
} |
| 4985 |
impl Debug for Lite<syn::token::MinusEq> { |
| 4986 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4987 |
formatter.write_str("Token![-=]") |
| 4988 |
} |
| 4989 |
} |
| 4990 |
impl Debug for Lite<syn::token::Mod> { |
| 4991 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4992 |
formatter.write_str("Token![mod]") |
| 4993 |
} |
| 4994 |
} |
| 4995 |
impl Debug for Lite<syn::token::Move> { |
| 4996 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 4997 |
formatter.write_str("Token![move]") |
| 4998 |
} |
| 4999 |
} |
| 5000 |
impl Debug for Lite<syn::token::Mut> { |
| 5001 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5002 |
formatter.write_str("Token![mut]") |
| 5003 |
} |
| 5004 |
} |
| 5005 |
impl Debug for Lite<syn::token::Ne> { |
| 5006 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5007 |
formatter.write_str("Token![!=]") |
| 5008 |
} |
| 5009 |
} |
| 5010 |
impl Debug for Lite<syn::token::Not> { |
| 5011 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5012 |
formatter.write_str("Token![!]") |
| 5013 |
} |
| 5014 |
} |
| 5015 |
impl Debug for Lite<syn::token::Or> { |
| 5016 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5017 |
formatter.write_str("Token![|]") |
| 5018 |
} |
| 5019 |
} |
| 5020 |
impl Debug for Lite<syn::token::OrEq> { |
| 5021 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5022 |
formatter.write_str("Token![|=]") |
| 5023 |
} |
| 5024 |
} |
| 5025 |
impl Debug for Lite<syn::token::OrOr> { |
| 5026 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5027 |
formatter.write_str("Token![||]") |
| 5028 |
} |
| 5029 |
} |
| 5030 |
impl Debug for Lite<syn::token::Override> { |
| 5031 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5032 |
formatter.write_str("Token![override]") |
| 5033 |
} |
| 5034 |
} |
| 5035 |
impl Debug for Lite<syn::token::PathSep> { |
| 5036 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5037 |
formatter.write_str("Token![::]") |
| 5038 |
} |
| 5039 |
} |
| 5040 |
impl Debug for Lite<syn::token::Percent> { |
| 5041 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5042 |
formatter.write_str("Token![%]") |
| 5043 |
} |
| 5044 |
} |
| 5045 |
impl Debug for Lite<syn::token::PercentEq> { |
| 5046 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5047 |
formatter.write_str("Token![%=]") |
| 5048 |
} |
| 5049 |
} |
| 5050 |
impl Debug for Lite<syn::token::Plus> { |
| 5051 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5052 |
formatter.write_str("Token![+]") |
| 5053 |
} |
| 5054 |
} |
| 5055 |
impl Debug for Lite<syn::token::PlusEq> { |
| 5056 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5057 |
formatter.write_str("Token![+=]") |
| 5058 |
} |
| 5059 |
} |
| 5060 |
impl Debug for Lite<syn::token::Pound> { |
| 5061 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5062 |
formatter.write_str("Token![#]") |
| 5063 |
} |
| 5064 |
} |
| 5065 |
impl Debug for Lite<syn::token::Priv> { |
| 5066 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5067 |
formatter.write_str("Token![priv]") |
| 5068 |
} |
| 5069 |
} |
| 5070 |
impl Debug for Lite<syn::token::Pub> { |
| 5071 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5072 |
formatter.write_str("Token![pub]") |
| 5073 |
} |
| 5074 |
} |
| 5075 |
impl Debug for Lite<syn::token::Question> { |
| 5076 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5077 |
formatter.write_str("Token![?]") |
| 5078 |
} |
| 5079 |
} |
| 5080 |
impl Debug for Lite<syn::token::RArrow> { |
| 5081 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5082 |
formatter.write_str("Token![->]") |
| 5083 |
} |
| 5084 |
} |
| 5085 |
impl Debug for Lite<syn::token::Raw> { |
| 5086 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5087 |
formatter.write_str("Token![raw]") |
| 5088 |
} |
| 5089 |
} |
| 5090 |
impl Debug for Lite<syn::token::Ref> { |
| 5091 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5092 |
formatter.write_str("Token![ref]") |
| 5093 |
} |
| 5094 |
} |
| 5095 |
impl Debug for Lite<syn::token::Return> { |
| 5096 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5097 |
formatter.write_str("Token![return]") |
| 5098 |
} |
| 5099 |
} |
| 5100 |
impl Debug for Lite<syn::token::SelfType> { |
| 5101 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5102 |
formatter.write_str("Token![Self]") |
| 5103 |
} |
| 5104 |
} |
| 5105 |
impl Debug for Lite<syn::token::SelfValue> { |
| 5106 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5107 |
formatter.write_str("Token![self]") |
| 5108 |
} |
| 5109 |
} |
| 5110 |
impl Debug for Lite<syn::token::Semi> { |
| 5111 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5112 |
formatter.write_str("Token![;]") |
| 5113 |
} |
| 5114 |
} |
| 5115 |
impl Debug for Lite<syn::token::Shl> { |
| 5116 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5117 |
formatter.write_str("Token![<<]") |
| 5118 |
} |
| 5119 |
} |
| 5120 |
impl Debug for Lite<syn::token::ShlEq> { |
| 5121 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5122 |
formatter.write_str("Token![<<=]") |
| 5123 |
} |
| 5124 |
} |
| 5125 |
impl Debug for Lite<syn::token::Shr> { |
| 5126 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5127 |
formatter.write_str("Token![>>]") |
| 5128 |
} |
| 5129 |
} |
| 5130 |
impl Debug for Lite<syn::token::ShrEq> { |
| 5131 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5132 |
formatter.write_str("Token![>>=]") |
| 5133 |
} |
| 5134 |
} |
| 5135 |
impl Debug for Lite<syn::token::Slash> { |
| 5136 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5137 |
formatter.write_str("Token![/]") |
| 5138 |
} |
| 5139 |
} |
| 5140 |
impl Debug for Lite<syn::token::SlashEq> { |
| 5141 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5142 |
formatter.write_str("Token![/=]") |
| 5143 |
} |
| 5144 |
} |
| 5145 |
impl Debug for Lite<syn::token::Star> { |
| 5146 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5147 |
formatter.write_str("Token![*]") |
| 5148 |
} |
| 5149 |
} |
| 5150 |
impl Debug for Lite<syn::token::StarEq> { |
| 5151 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5152 |
formatter.write_str("Token![*=]") |
| 5153 |
} |
| 5154 |
} |
| 5155 |
impl Debug for Lite<syn::token::Static> { |
| 5156 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5157 |
formatter.write_str("Token![static]") |
| 5158 |
} |
| 5159 |
} |
| 5160 |
impl Debug for Lite<syn::token::Struct> { |
| 5161 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5162 |
formatter.write_str("Token![struct]") |
| 5163 |
} |
| 5164 |
} |
| 5165 |
impl Debug for Lite<syn::token::Super> { |
| 5166 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5167 |
formatter.write_str("Token![super]") |
| 5168 |
} |
| 5169 |
} |
| 5170 |
impl Debug for Lite<syn::token::Tilde> { |
| 5171 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5172 |
formatter.write_str("Token![~]") |
| 5173 |
} |
| 5174 |
} |
| 5175 |
impl Debug for Lite<syn::token::Trait> { |
| 5176 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5177 |
formatter.write_str("Token![trait]") |
| 5178 |
} |
| 5179 |
} |
| 5180 |
impl Debug for Lite<syn::token::Try> { |
| 5181 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5182 |
formatter.write_str("Token![try]") |
| 5183 |
} |
| 5184 |
} |
| 5185 |
impl Debug for Lite<syn::token::Type> { |
| 5186 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5187 |
formatter.write_str("Token![type]") |
| 5188 |
} |
| 5189 |
} |
| 5190 |
impl Debug for Lite<syn::token::Typeof> { |
| 5191 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5192 |
formatter.write_str("Token![typeof]") |
| 5193 |
} |
| 5194 |
} |
| 5195 |
impl Debug for Lite<syn::token::Underscore> { |
| 5196 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5197 |
formatter.write_str("Token![_]") |
| 5198 |
} |
| 5199 |
} |
| 5200 |
impl Debug for Lite<syn::token::Union> { |
| 5201 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5202 |
formatter.write_str("Token![union]") |
| 5203 |
} |
| 5204 |
} |
| 5205 |
impl Debug for Lite<syn::token::Unsafe> { |
| 5206 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5207 |
formatter.write_str("Token![unsafe]") |
| 5208 |
} |
| 5209 |
} |
| 5210 |
impl Debug for Lite<syn::token::Unsized> { |
| 5211 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5212 |
formatter.write_str("Token![unsized]") |
| 5213 |
} |
| 5214 |
} |
| 5215 |
impl Debug for Lite<syn::token::Use> { |
| 5216 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5217 |
formatter.write_str("Token![use]") |
| 5218 |
} |
| 5219 |
} |
| 5220 |
impl Debug for Lite<syn::token::Virtual> { |
| 5221 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5222 |
formatter.write_str("Token![virtual]") |
| 5223 |
} |
| 5224 |
} |
| 5225 |
impl Debug for Lite<syn::token::Where> { |
| 5226 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5227 |
formatter.write_str("Token![where]") |
| 5228 |
} |
| 5229 |
} |
| 5230 |
impl Debug for Lite<syn::token::While> { |
| 5231 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5232 |
formatter.write_str("Token![while]") |
| 5233 |
} |
| 5234 |
} |
| 5235 |
impl Debug for Lite<syn::token::Yield> { |
| 5236 |
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| 5237 |
formatter.write_str("Token![yield]") |
| 5238 |
} |
| 5239 |
} |