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

Regression for let in allowing variables to start with _ (underscore) #1105

Closed
cipriancraciun opened this issue Nov 14, 2024 · 1 comment
Closed

Comments

@cipriancraciun
Copy link
Contributor

cipriancraciun commented Nov 14, 2024

Up to version 12 (excluding), one could have written {% let _x = 7 %} and have it correctly compile. In version 12.1, it fails with:

error: literals are not allowed on the left-hand side of an assignment

(According to the Rust reference, identifiers are allowed to start with an _, as per https://doc.rust-lang.org/reference/identifiers.html.)

It appears that neither identifiers that start with an upper-case letter (like X) are allowed, with the same error.

@djc
Copy link
Collaborator

djc commented Nov 15, 2024

Sorry for the regression, looks like this has been fixed on main though -- see #1035 for the upcoming 0.13 release.

@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
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

2 participants