Skip to content

Commit

Permalink
stringify type when skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Apr 8, 2024
1 parent c2d8cff commit 686e4cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec-gen/src/visitors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use quote::quote;
use syn::{
parse_quote, visit, visit::Visit, visit_mut, visit_mut::VisitMut,
AngleBracketedGenericArguments, Generics, Ident, ItemFn, Type,
Expand Down Expand Up @@ -202,7 +203,10 @@ impl<'ast> Visit<'ast> for TypeNameVisitor {
visit::visit_type_path(self, node);
self.in_context = false;
}
ty => println!("skipping type during visit: {ty:?}"),
ty => {
let ty_str = quote!(#ty).to_string();
println!("skipping type during visit: `{ty_str}`");
}
}
visit::visit_pat_type(self, i);
}
Expand Down

0 comments on commit 686e4cd

Please sign in to comment.