We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The documentation for Ident has an example of how to make an ident with a name derived from another: https://docs.rs/proc-macro2/1.0.32/proc_macro2/struct.Ident.html#examples by just interpolating with format!(). However, it appears that if the original ident was raw, the output is invalid and unparseable: sfackler/rust-postgres#839.
Ident
format!()
Is there any way of handling this properly other than something like format!("__{}", ident.to_string().strip_prefix("r#"))?
format!("__{}", ident.to_string().strip_prefix("r#"))
The text was updated successfully, but these errors were encountered:
"__r#type"
https://docs.rs/quote/1/quote/macro.format_ident.html is the best option: format_ident!("__{}", ident)
format_ident!("__{}", ident)
Sorry, something went wrong.
No branches or pull requests
The documentation for
Ident
has an example of how to make an ident with a name derived from another: https://docs.rs/proc-macro2/1.0.32/proc_macro2/struct.Ident.html#examples by just interpolating withformat!()
. However, it appears that if the original ident was raw, the output is invalid and unparseable: sfackler/rust-postgres#839.Is there any way of handling this properly other than something like
format!("__{}", ident.to_string().strip_prefix("r#"))
?The text was updated successfully, but these errors were encountered: