Skip to content
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

Remove unused crate imports in 2018 edition crates #73570

Closed
tesuji opened this issue Jun 21, 2020 · 3 comments · Fixed by #73638
Closed

Remove unused crate imports in 2018 edition crates #73570

tesuji opened this issue Jun 21, 2020 · 3 comments · Fixed by #73638
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Jun 21, 2020

Unused imports like use libc;.
One could use this regex

^\s*use\s+[a-z][_a-zA-Z0-9]*;

or try https://grep.app/search?q=%5E%5Cs%2Ause%5Cs%2B%5Ba-z%5D%5B_a-zA-Z0-9%5D%2A%3B&regexp=true&case=true&filter[lang][0]=Rust&filter[repo][0]=rust-lang/rust.

This issue has been assigned to @Yuqio via this comment.

@LeSeulArtichaut LeSeulArtichaut added C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Jun 21, 2020
@tesuji tesuji changed the title [easy] Replace unused imports in 2018 edition crates [easy] Remove unused imports in 2018 edition crates Jun 21, 2020
@tesuji tesuji changed the title [easy] Remove unused imports in 2018 edition crates Remove unused imports in 2018 edition crates Jun 21, 2020
@nn1ks
Copy link
Contributor

nn1ks commented Jun 21, 2020

@rustbot claim

@rustbot rustbot self-assigned this Jun 21, 2020
@nn1ks
Copy link
Contributor

nn1ks commented Jun 22, 2020

I'm not sure if the use statements in this file are needed. Specifically the use {Foo, Bar} and use y.

Are they needed here for a test or can I remove them?

@tesuji tesuji changed the title Remove unused imports in 2018 edition crates Remove unused crate imports in 2018 edition crates Jun 23, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Jun 23, 2020

I'm sorry for being unclear. I changed the issue title to "remove unused crate imports".

Manishearth added a commit to Manishearth/rust that referenced this issue Jun 24, 2020
…r=nikomatsakis

Remove unused crate imports in 2018 edition crates

Closes rust-lang#73570
@bors bors closed this as completed in 38c85b7 Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants