-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 span snippet in all suggestions where possible #3023
Comments
Uh... that's what we're doing. But the span points to the expanded tokens. We need to figure out the unexpanded span for most of these things |
This could be sidestepped by pointing the span only to |
bors bot
added a commit
that referenced
this issue
Oct 28, 2018
3217: Fix string_lit_as_bytes lint for macros r=phansch a=yaahallo Prior to this change, string_lit_as_bytes would trigger for constructs like `include_str!("filename").as_bytes()` and would recommend fixing it by rewriting as `binclude_str!("filename")`. This change updates the lint to act as an EarlyLintPass lint. It then differentiates between string literals and macros that have bytes yielding alternatives. Closes #3205 3366: Don't expand macros in some suggestions r=oli-obk a=phansch Fixes #1148 Fixes #1628 Fixes #2455 Fixes #3023 Fixes #3333 Fixes #3360 Co-authored-by: Jane Lusby <jlusby42@gmail.com> Co-authored-by: Philipp Hansch <dev@phansch.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suggestions should first attempt to use a span snippet instead of generated code (presumably a
Ty
) to avoid suggesting incorrect code:The text was updated successfully, but these errors were encountered: