-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Improve string concatenation suggestion #92843
Conversation
Now, multipart suggestions are used instead of `span_to_snippet`, which improves code quality, makes the suggestion work even without access to source code, and, most importantly, improves the rendering of the suggestion.
This should make it easier to read.
This code is sufficiently complex -- I'm guessing due to the very long `match` guards -- that rustfmt doesn't format it.
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @davidtwco |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these changes, I've left some nitpicks and comments regarding the specific messages but this looks good otherwise.
I went with a shorter and slightly different version of the |
@bors r+ rollup |
📌 Commit 7c4eca0 has been approved by |
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#91965 (Add more granular `--exclude` in `x.py`) - rust-lang#92467 (Ensure that early-bound function lifetimes are always 'local') - rust-lang#92586 (Set the allocation MIN_ALIGN for espidf to 4.) - rust-lang#92835 (Improve error message for key="value" cfg arguments.) - rust-lang#92843 (Improve string concatenation suggestion) - rust-lang#92963 (Implement tuple array diagnostic) - rust-lang#93046 (Use let_else in even more places) - rust-lang#93109 (Improve `Arc` and `Rc` documentation) - rust-lang#93134 (delete `Stdin::split` forwarder) - rust-lang#93139 (rustdoc: fix overflow-wrap for table layouts) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Before:
After: