-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
clippy::map_flatten
multiline suggestion is missing closing tokens
#8506
Comments
@xFrednet Sorry for the pin, but I'm confused about how should I implement this. Since this seems to be a design flaw of |
Hey @J-ZhengLi, no worries you're always welcome to ping me 🙃 This is a "design flaw" at one pint it might be good to add a new display option to rustc to say that the edges of the marked span are important. For now, we can check if the suggestion is larger than
You can also create a helper method that can be shared between lints if you want to be fancy. The suggested method of formatting will be a good solution in the meantime 🙃 Feel free to ping me if you want to implement either solution and want help or just a review 🙃 |
Summary
Suggestion is incorrect Rust code.
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: