-
Notifications
You must be signed in to change notification settings - Fork 148
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
Using #[strum(to_string = "}")]
results in macro error
#363
Comments
Somfic
changed the title
Bracket closed without previous opened bracket
Using Jun 8, 2024
#[strum(to_string = "}")]
results in macro error
I'm also hitting this recently (same code worked before). It doesn't occur in strum 0.25 |
After #360, the use of |
Related to #361. I haven't had time to fix this yet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I’m tinkering with writing a transpiler and am currently in the lexing stage. In my
Token
enum I have the following variant:CurlyClose
. I’d like to implement theDisplay
trait forToken
using strum.What I currently have:
The
#[strum(to_string = "}")]
macro is throwing aBracket closed without previous opened bracket
compiler error. When I try to escape the closing curly brace the macro panics withproc-macro panicked: unexpected byte '}' after \ character in string literal
.Am I doing something wrong? Other braces such as
{
[
]
(
and)
work fine.The text was updated successfully, but these errors were encountered: