Skip to content
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

Use raw identifiers when expanding the macro #473

Closed
SciStarter opened this issue Apr 17, 2021 · 4 comments
Closed

Use raw identifiers when expanding the macro #473

SciStarter opened this issue Apr 17, 2021 · 4 comments

Comments

@SciStarter
Copy link
Contributor

When expanding the template macro, it would be nice to replace all of the identifiers defined in the template with raw identifiers in the generated code.

Currently, Rust keywords are sort-of reserved words in the template, in that they trigger weird errors, but they are neither called out as explicit errors nor allowed in working code. Using raw identifiers would allow them to work with no issues.

@djc
Copy link
Owner

djc commented Apr 17, 2021

I'm open to doing this but only for Rust keywords. Are you willing to submit a PR?

@SciStarter
Copy link
Contributor Author

SciStarter commented Apr 19, 2021 via email

@djc
Copy link
Owner

djc commented Apr 19, 2021

It makes the generated code uglier/harder to read -- and it's not like doing it for keywords only incurs a lot of complexity.

@vallentin
Copy link
Collaborator

Resolved in #476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants