Skip to content

LitByteStr produces tokens that trigger clippy::octal-escapes #363

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

Closed
robertbastian opened this issue Jan 28, 2023 · 2 comments · Fixed by #380
Closed

LitByteStr produces tokens that trigger clippy::octal-escapes #363

robertbastian opened this issue Jan 28, 2023 · 2 comments · Fixed by #380

Comments

@robertbastian
Copy link

Not sure whether to file this here or in quote.

LitByteStr::new(&[65, 0], ...) quotes as b"a\0", which triggers this default clippy lint. Whether that lint should be default is a different question, but it'd be nice if syn output would be clippy clean. This would mean representing 0u8 by \x00 instead of \0.

@dtolnay dtolnay transferred this issue from dtolnay/syn Jan 28, 2023
@robertbastian

This comment was marked as off-topic.

@robertbastian
Copy link
Author

Actually this only triggers if the \0 is followed by a digit.

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

Successfully merging a pull request may close this issue.

1 participant