-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Pretty-print mode to replace glob imports with a precise list of names #4786
Comments
Added far-future milestone |
Ooh, this would be great. |
Triage: no change. Globs are now behind a |
@huonw or maybe the feature guard makes this higher priority, since it would ease development shifting from local-hacking-mode that uses feature guards and relase-to-the-wild mode that tries to eschew feature guards. :) |
cc @nick29581 who hinted at "a deglobber tool which would convert glob imports to proper imports" in #19254. |
FTR, save-analysis now knows exactly the list of imports needed for this (since #19254), so all that is needed is to use that info in pretty printing. I was actually thinking of making this an external tool, possibly a Cargo plugin. I've been playing around with an approach to this, but haven't got very far. If anyone wants to work on this, please ping me. |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#617 |
So if I have a file with this:
...and of all the things that
foo
provides, I only ever end up usingbar
andbaz
, then it should rewrite the import to:The text was updated successfully, but these errors were encountered: