merge unused-extern-crate and unnecessary-extern-crate lints Extend the `unused_extern_crates` lint to offer a suggestion to remove the extern crate and remove the `unnecessary_extern_crate` lint. Still a few minor issues to fix: - [x] this *does* now leave a blank line... (defer to https://github.com/rust-lang/rust/issues/51176) - idea: extend the span to be replaced by 1 character if the next character is a `\n` - [x] what about macros? do we need to watch out for that? (defer to https://github.com/rust-lang/rust/issues/48704) - [x] also it doesn't work for `extern crate foo; fn main() { foo::bar(); }` - this is subtle: the `foo` might be shadowing a glob import too, can't always remove - defer to https://github.com/rust-lang/rust/issues/51177 - [x] we also don't do the `pub use` rewrite thang (https://github.com/rust-lang/rust/issues/51013) Spun off from https://github.com/rust-lang/rust/pull/51010 Fixes #50672 r? @alexcrichton |
||
|---|---|---|
| .. | ||
| bootstrap | ||
| build_helper | ||
| ci | ||
| dlmalloc@c99638dc2e | ||
| doc | ||
| etc | ||
| grammar | ||
| jemalloc@1f5a28755e | ||
| liballoc | ||
| liballoc_jemalloc | ||
| liballoc_system | ||
| libarena | ||
| libbacktrace@f4d02bbdbf | ||
| libcompiler_builtins@4cfd7101eb | ||
| libcore | ||
| libfmt_macros | ||
| libgraphviz | ||
| liblibc@a7e78a78e1 | ||
| libpanic_abort | ||
| libpanic_unwind | ||
| libproc_macro | ||
| libprofiler_builtins | ||
| librustc | ||
| librustc_allocator | ||
| librustc_apfloat | ||
| librustc_asan | ||
| librustc_borrowck | ||
| librustc_codegen_llvm | ||
| librustc_codegen_utils | ||
| librustc_cratesio_shim | ||
| librustc_data_structures | ||
| librustc_driver | ||
| librustc_errors | ||
| librustc_incremental | ||
| librustc_lint | ||
| librustc_llvm | ||
| librustc_lsan | ||
| librustc_metadata | ||
| librustc_mir | ||
| librustc_msan | ||
| librustc_passes | ||
| librustc_platform_intrinsics | ||
| librustc_plugin | ||
| librustc_privacy | ||
| librustc_resolve | ||
| librustc_save_analysis | ||
| librustc_target | ||
| librustc_traits | ||
| librustc_tsan | ||
| librustc_typeck | ||
| librustdoc | ||
| libserialize | ||
| libstd | ||
| libstd_unicode | ||
| libsyntax | ||
| libsyntax_ext | ||
| libsyntax_pos | ||
| libterm | ||
| libtest | ||
| libunwind | ||
| llvm@9ad4b7e8d7 | ||
| llvm-emscripten@2717444753 | ||
| rtstartup | ||
| rustc | ||
| rustllvm | ||
| stdsimd@a19ca1cd91 | ||
| test | ||
| tools | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| stage0.txt | ||
This directory contains the source code of the rust project, including:
rustcand its testslibstd- Various submodules for tools, like rustdoc, rls, etc.
For more information on how various parts of the compiler work, see the rustc guide.
Their is also useful content in the following READMEs, which are gradually being moved over to the guide:
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/maps
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
- https://github.com/rust-lang/rust/blob/master/src/librustc/infer/region_constraints
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve