Skip to content

Pretty-print mode to replace glob imports with a precise list of names #617

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

Closed
steveklabnik opened this issue Jan 21, 2015 · 3 comments
Closed
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

Issue by bstrie
Monday Feb 04, 2013 at 19:05 GMT

For earlier discussion, see rust-lang/rust#4786

This issue was labelled with: A-pretty, A-resolve, I-wishlist in the Rust repository


13:58 < bstrie> is there a pretty-print mode to replace a glob import with a
                precise list of names?
13:59 <@pcwalton> bstrie: no unfortunately
13:59 <@pcwalton> good idea though

So if I have a file with this:

use foo::*;

...and of all the things that foo provides, I only ever end up using bar and baz, then it should rewrite the import to:

use foo::{bar, baz};
@nrc
Copy link
Member

nrc commented Jan 21, 2015

I have a tool for this: https://github.com/nick29581/deglobber WIP

@alexcrichton alexcrichton added the T-dev-tools Relevant to the development tools team, which will review and decide on the RFC. label May 18, 2015
@scottmcm
Copy link
Member

With deglob refactoring in RLS, can this be closed?

@Centril
Copy link
Contributor

Centril commented Oct 7, 2018

Per Scott's comment in #617 (comment) I'm closing this.

@Centril Centril closed this as completed Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

6 participants