Simplify Debug representation of Ident
diff --git a/src/lib.rs b/src/lib.rs
index 4e5577d..9092569 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -439,7 +439,13 @@
// so don't bother with an extra layer of indirection
match *self {
TokenTree::Group(ref t) => t.fmt(f),
- TokenTree::Ident(ref t) => t.fmt(f),
+ TokenTree::Ident(ref t) => {
+ let mut debug = f.debug_struct("Ident");
+ debug.field("sym", &format_args!("{}", t));
+ #[cfg(any(feature = "nightly", procmacro2_semver_exempt))]
+ debug.field("span", &t.span());
+ debug.finish()
+ }
TokenTree::Punct(ref t) => t.fmt(f),
TokenTree::Literal(ref t) => t.fmt(f),
}