-
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
Hidden suggestion support #58296
Hidden suggestion support #58296
Conversation
This comment has been minimized.
This comment has been minimized.
@zackmdavis This PR is to allow @pietroalbini to add a suggestion to remove a few items out of an
becomes
|
Looks promising! |
Assign this to another person, I'm not expert enough of this part of the codebase to review this PR. |
r? @oli-obk |
The impl Lgtm but I'm not too happy about merging it without using it |
Initial implementation of rustfixable unused_imports lint This PR adds the initial implementation of rustfixable `unused_imports` lint. The implementation works, but rustfix is not able to apply all the suggestions until #53934 is fixed. It also needs #58296 to hide the suggested note since it's really useless. cc #47888 <details><summary><code>cargo fix</code> in action on the <code>unused_imports</code> lint</summary> ![screenshot from 2018-12-09 15-49-01](https://user-images.githubusercontent.com/2299951/49698874-3a026080-fbca-11e8-9bf1-24060b6c59c8.png) </details>
#56645 has been merged. |
b277043
to
87dd2e1
Compare
We'll need to update these tests to run rustfix once the rustfix in master can handle these cases, but checking the json output shows that these are correctly exposed. We don't expose the type of suggestion, so tools will not be able to differentiate between the different styles, but I think that is something we can defer on. |
@oli-obk added one use of these methods, leaving the other methods in because otherwise it feels incomplete. @pietroalbini please verify that the new output is what you had in mind. VSCode will still provide the same messages as before. |
Yep, thanks! |
@bors r+ |
📌 Commit 87dd2e1 has been approved by |
Hidden suggestion support Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding. r? @pietroalbini CC @zackmdavis
Hidden suggestion support Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding. r? @pietroalbini CC @zackmdavis
Rollup of 8 pull requests Successful merges: - #57451 (suggestion-diagnostics: as_ref improve snippet) - #57856 (Convert old first edition links to current edition one) - #57992 (Update the future/task API) - #58258 (Reduce the size of `hir::Expr`.) - #58267 (Tweak "incompatible match arms" error) - #58296 (Hidden suggestion support) - #58301 (Enable comparing fat pointers) - #58308 (Extract block to insert an intrinsic into its own function) Failed merges: r? @ghost
Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding.
r? @pietroalbini CC @zackmdavis