diff options
| author | bors <bors@rust-lang.org> | 2020-02-21 11:32:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-21 11:32:12 +0000 |
| commit | e342047068c010bf503db2d018974b7c5198fb5b (patch) | |
| tree | 1b9569d4cc1a9f45f25396c827e5241472cbea82 /src/test/incremental/thinlto | |
| parent | acfcbee4a2b10e5a3ac2fe3e29e79a2828720b70 (diff) | |
| parent | 4dd2252b17915a6b11b8e9ea4bc4500e80437a60 (diff) | |
| download | rust-e342047068c010bf503db2d018974b7c5198fb5b.tar.gz rust-e342047068c010bf503db2d018974b7c5198fb5b.zip | |
Auto merge of #5029 - flip1995:wildcard_imports, r=phansch
New Lint: `wildcard imports` Fixes #1228 ### A few notes: - I put this lint in the pedantic group, even though in the issue restriction was mentioned. - Every fallout fix was automatically applied by `cargo fix` (This produced 3 `unused_imports` warnings) and are in commit 7e834c8. So reverting these changes wouldn't be a problem. ### A few ideas: - A configuration to specify the amount of imported Items, where a `*` might be better. - ~~A configuration to disable the lint for enums. Or just disable the lint for enums, since there is [`enum_glob_use`](https://rust-lang.github.io/rust-clippy/master/index.html#enum_glob_use)~~ I moved `enum_glob_use` into this lint in 12937f0 ### A few quotes from the issue: > Is there a way to ask the compiler about the modules or symbols that the current file is using? Yes there is. I found it, once I was nearly finished implementing it myself. See 321d64a > one hard optional feature would be to figure out what is currently used and add a suggestion to replace it with a full import list. Yeah that was pretty hard, until I found the query for this. Queries are cool, but too hard to find. > FWIW VS Code and Intellij IDEA both offer imports deglobbing which replace * with required imports. And now, Clippy can do this too! :tada: --- Your thoughts on the notes/ideas? changelog: Add new lint [`wildcard imports`]. Add suggestion to [`enum_glob_use`]
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
