dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.82k stars 308 forks source link

allow `custom_keyword!` to support different struct name #1507

Open ModProg opened 1 year ago

ModProg commented 1 year ago

I'd prefer to have uppercase Struct names, consistent with the actual keywords in syn::token::*.

I propose a syntax, like custom_keyword!(var as Var), that could be non-breakingly be introduced.

If this is something you'd consider, I'd be willing to implement it.

Fancyflame commented 1 month ago

I think you can try using use var as Var; as a temporary workaround for this issue.

Additionally, I also support this suggestion. Why not submit a PR directly?