filter_next: big clean-up#17233
Conversation
Among other things, this duplicates the repro for issue10029 for `.next_back()`
|
r? @Jarcho rustbot has assigned @Jarcho. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Lintcheck changes for bef6f41
This comment will be updated if you push new changes |
..and inline `msg`, to make next commit's diff a bit nicer
ee02d36 to
0bdf023
Compare
|
Reminder, once the PR becomes ready for a review, use |
|
Removed the changelog message. This isn't a big enough change to have an entry there. |
Apologies, I did in fact somewhat struggle with titling this 😅 For me, a clean-up, even a big one, is always a series of straightforward and (hopefully) uncontroversial changes. For deeper architecture changes I normally use "overhaul" instead |
Yeah that's fair, I've used this same changelog message in several recent PRs, I'd go clean them up as well then. |
1. In the singe-line case, we switch to verbose suggestions, otherwise the suggestion line gets too long due to the longer message. 2. In the multi-line case, we use span-less help, otherwise the whole multiline span gets highlighted the second time. 3. Also make the suggestion message more concise.
0bdf023 to
537443b
Compare
|
Btw, the "only emit a suggestion if the snippet is single-line" thing is only done due to limitations in Clippy (or rustc I guess) which are no longer there, right? Should I go on and remove that as well? (in this or separate PR, as you prefer) |
|
I don't know if that was ever fixed. It was due to a diagnostic rendering issue in rustc. |
This used to be a workaround for a rustc diagnostics issue which has since been resolved
|
Well, I just tested it, and it does seem to work -- see the latest commit. Let me know if I should keep it in |
Fwiw I think rustc switches to it automatically when the suggestion spans multiple lines. Though it could be that that's actually a part of their fix of this issue |
changelog: none