Sample code:
for item in file.items.iter() {
match item {
Item::Enum(e) => {
println!("enum: {:?}", e);
}
Error:
9 | println!("enum: {:?}", e);
| ^ `ItemEnum` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
= help: the trait `Debug` is not implemented for `ItemEnum`
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
However, we have debug.rs - source
So my question is: how do we print an ItemEnum ?
ItemEnum: ItemEnum in syn - Rust