diff options
| author | bors <bors@rust-lang.org> | 2018-05-08 01:37:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-08 01:37:52 +0000 |
| commit | 0da1a69003bd37ef0ee2cde2eb66a9e2752fc6c2 (patch) | |
| tree | edd8b535e989e1c8e723a41dfb26ecdc80adb828 /src/liballoc | |
| parent | 715d6a98aa4908dfb85b55f97e51af330d0baf7f (diff) | |
| parent | 01791dee8a6c93bdbc9e3c9369b6b5f0ee35e5c8 (diff) | |
| download | rust-0da1a69003bd37ef0ee2cde2eb66a9e2752fc6c2.tar.gz rust-0da1a69003bd37ef0ee2cde2eb66a9e2752fc6c2.zip | |
Auto merge of #50260 - Manishearth:no-extern-crate, r=nikomatsakis
idiom lints for removing `extern crate`
Based off of https://github.com/rust-lang/rust/pull/49789
This contains two lints:
- One that suggests replacing pub extern crates with pub use, and removing non-pub extern crates entirely
- One that suggests rewriting `use modulename::...::cratename::foo` as `cratename::foo`
The latter is a bit tricky to emit suggestions for; for one this involves splicing spans (never a good idea), and it also won't be able to correctly
handle `use module::{cratename, foo}` and use-trees. I'm not sure how to proceed here. Currently it doesn't suggest anything at all.
Perhaps we can go the other way and suggest removal of all extern crates _except_ those used through modules (stash node ids somewhere) and suggest replacing those with `<visibility> use`?
r? @nikomatsakis
fixes https://github.com/rust-lang/rust/issues/48719
Diffstat (limited to 'src/liballoc')
0 files changed, 0 insertions, 0 deletions
