-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
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
"__r#type"
is not a valid identifier
#839
Comments
It looks like it's due to this line: https://github.com/sfackler/rust-postgres/blob/master/postgres-derive/src/fromsql.rs#L122, which is actually mirroring an example in proc-macro2: https://docs.rs/proc-macro2/1.0.32/proc_macro2/struct.Ident.html#examples. It may be a bug in either proc-macro2 or the stdlib proc-macro? |
dtolnay/proc-macro2#234, the examples arent correct enough, this is right behaviour, raw identifiers need to be handled differently, it seems. |
I currently have to work with the raw identifier
r#type
, as one database table is using this. I can't change this name, as i'm merely reading out the data from a pre-existing format.However, when i try to put in a struct format, like so;
The proc-macro panics on;
I think this problem will be the same across all raw identifiers.
The text was updated successfully, but these errors were encountered: