We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af0d2aa commit de4ff62Copy full SHA for de4ff62
lightning-macros/src/lib.rs
@@ -278,6 +278,7 @@ pub fn drop_legacy_field_definition(expr: TokenStream) -> TokenStream {
278
if let syn::Expr::Macro(syn::ExprMacro { mac, .. }) = &field.expr {
279
let macro_name = mac.path.segments.last().unwrap().ident.to_string();
280
let is_init = macro_name == "_ignore_arg";
281
+ // Skip `field_name` and `:`, giving us just the type's group
282
let ty_tokens = mac.tokens.clone().into_iter().skip(2).next();
283
if let Some(proc_macro2::TokenTree::Group(group)) = ty_tokens {
284
let first_token = group.stream().into_iter().next();
0 commit comments