-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Support r#raw_identifiers
#932
Comments
Thanks! Looks like The one thing I'm worried about: we technically need to do this for all possible identifiers, whether functions, fields, constants, types, parameters, structs, enums, maybe even macros or attributes? This would require huge changes for very little benefit (and using keywords for identifiers is typically not best practice, plus it can be worked around with rename). 🤔 |
I'd say this isn't our fault. There should be a way in venial to retrieve the identifier regardless of the |
I hadn't heard of |
I'm not sure what is the best way to report this in |
There aren't many contributors to venial at the moment, a while ago I helped out with lots of large-scale additions. So your best chances are to open a PR, I could also help review it 😉 |
i dont think you could really do this, since then you'd get an error if you then tried to use the raw identifier in a macro somewhere. like say you had a macro fn main() {
let identity!(r#let) = 10;
} since it'd become |
This still stands. Unless someone is willing to demonstrate that this is possible to implement without significantly worsening maintenance, I don't think the small benefit is worth the downsides. |
Hello!
I wanted to have a function named
box
, so my first natural instinct was to do:Using raw identifiers.
When I went to use the function from GDScript, I expected to see a function named
box
, but instead I got a function namedr#box
.Note: I then learned that you can do this instead:
Which is not bad at all, but it is not the "native" way to use reserved names in Rust.
The text was updated successfully, but these errors were encountered: