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

Cant have translation keys which are Rust keywords #6

Open
Nutomic opened this issue Jan 22, 2022 · 1 comment
Open

Cant have translation keys which are Rust keywords #6

Nutomic opened this issue Jan 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Nutomic
Copy link

Nutomic commented Jan 22, 2022

For example, mod.

--> /home/felix/workspace/lemmy/target/debug/build/lemmy_websocket-5c9ec7d2402ea26c/out/rosetta_output.rs:1:35802
|
1 | ...[allow (clippy :: match_single_binding)] pub fn mod (& self) -> & 'static str { match self { _ => "mod" } } # [allow (clippy :: match_...
|                                                    ^^^ expected identifier, found keyword
|
help: you can escape reserved keywords to use them as identifiers

Would be good if identifiers could be escaped, as suggested by the help message. Syntax is like let r#mod = 123;.

@baptiste0928
Copy link
Owner

Thanks for reporting, I'll fix that as soon as possible!

@baptiste0928 baptiste0928 added the bug Something isn't working label Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants