rust/src
bors 1b3d737716 Auto merge of #51015 - nikomatsakis:issue-50672-remove-extern-crate-idiom, r=alexcrichton
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
2018-06-02 11:14:14 +00:00
..
bootstrap Run rustfmt 2018-05-30 14:36:23 -03:00
build_helper
ci armebv7r-none-eabihf: default to ARM mode 2018-05-18 20:57:48 +02:00
dlmalloc@c99638dc2e
doc Auto merge of #51066 - est31:master, r=sfackler 2018-05-27 00:54:12 +00:00
etc rust-gdb: work around the re-used -d argument in cgdb 2018-05-21 20:58:19 -04:00
grammar
jemalloc@1f5a28755e
liballoc incorporate changes from code review 2018-06-01 17:13:26 +02:00
liballoc_jemalloc Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
liballoc_system Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
libarena Make &Slice a thin pointer 2018-05-27 17:28:35 +02:00
libbacktrace@f4d02bbdbf Replace libbacktrace with a submodule 2018-05-30 05:58:23 -07:00
libcompiler_builtins@4cfd7101eb update libcompiler_builtins 2018-05-13 07:14:36 +02:00
libcore Auto merge of #50554 - clarcharr:from_bool, r=TimNN 2018-06-02 07:50:10 +00:00
libfmt_macros Improve format string errors 2018-05-10 09:09:58 -07:00
libgraphviz
liblibc@a7e78a78e1
libpanic_abort
libpanic_unwind NetBSD on EABI ARM does not use ARM EHABI 2018-05-18 09:29:58 -05:00
libproc_macro Update recursion limits 2018-06-01 14:56:01 +02:00
libprofiler_builtins
librustc Auto merge of #51015 - nikomatsakis:issue-50672-remove-extern-crate-idiom, r=alexcrichton 2018-06-02 11:14:14 +00:00
librustc_allocator Add edition to expansion info 2018-05-17 23:13:08 +03:00
librustc_apfloat Comment typo 2018-04-30 18:18:32 +02:00
librustc_asan
librustc_borrowck change PointerKind::Implicit to a note 2018-05-31 10:17:51 -04:00
librustc_codegen_llvm rustc: rename mir::LocalDecl's syntactic_source_info to source_info. 2018-05-30 20:30:10 +03:00
librustc_codegen_utils Update recursion limits 2018-06-01 14:56:01 +02:00
librustc_cratesio_shim rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
librustc_data_structures Add a WorkerLocal abstraction 2018-06-01 14:57:07 +02:00
librustc_driver stop invoking DebruijnIndex::new directly 2018-05-28 19:47:04 -04:00
librustc_errors Make short-error format GNU compatible 2018-05-31 20:09:27 +02:00
librustc_incremental Serialize attributes into the CrateRoot 2018-05-18 09:37:29 -07:00
librustc_lint merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATES 2018-06-01 11:00:18 -04:00
librustc_llvm Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
librustc_lsan
librustc_metadata Update recursion limits 2018-06-01 14:56:01 +02:00
librustc_mir Auto merge of #51225 - oli-obk:miri_oob_ptr, r=eddyb 2018-06-01 06:42:12 +00:00
librustc_msan
librustc_passes Auto merge of #51182 - eddyb:not-just-visibility, r=nikomatsakis 2018-05-31 08:55:09 +00:00
librustc_platform_intrinsics
librustc_plugin Pass crate editions to macro expansions, update tests 2018-05-17 23:13:09 +03:00
librustc_privacy Update recursion limits 2018-06-01 14:56:01 +02:00
librustc_resolve Add std/core to prelude if extern_prelude enabled 2018-05-31 06:37:53 -07:00
librustc_save_analysis Update recursion limits 2018-06-01 14:56:01 +02:00
librustc_target Replace ScalarKind with Primitive 2018-05-24 20:49:37 +02:00
librustc_traits Update recursion limits 2018-06-01 14:56:01 +02:00
librustc_tsan
librustc_typeck Auto merge of #51015 - nikomatsakis:issue-50672-remove-extern-crate-idiom, r=alexcrichton 2018-06-02 11:14:14 +00:00
librustdoc merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATES 2018-06-01 11:00:18 -04:00
libserialize
libstd Auto merge of #51270 - nicokoch:issue-51266, r=TimNN 2018-06-02 03:06:26 +00:00
libstd_unicode
libsyntax Rollup merge of #51240 - nnethercote:parse-2, r=nikomatsakis 2018-05-31 22:17:16 +02:00
libsyntax_ext Add Ident::as_str helper 2018-05-26 15:20:23 +03:00
libsyntax_pos Add Ident::as_str helper 2018-05-26 15:20:23 +03:00
libterm
libtest Remove leftover tab in libtest outputs 2018-05-02 08:35:33 +02:00
libunwind NetBSD on EABI ARM does not use ARM EHABI 2018-05-18 09:29:58 -05:00
llvm@9ad4b7e8d7 more reverts 2018-05-24 16:22:58 +02:00
llvm-emscripten@2717444753
rtstartup Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
rustc Fix rustc binary metadata overwriting librustc metadata 2018-05-17 08:47:25 -06:00
rustllvm Rollup merge of #50827 - nox:llvmup, r=eddyb 2018-05-20 04:16:01 +08:00
stdsimd@a19ca1cd91 rever tool changes 2018-05-24 16:21:23 +02:00
test Auto merge of #51015 - nikomatsakis:issue-50672-remove-extern-crate-idiom, r=alexcrichton 2018-06-02 11:14:14 +00:00
tools Update miri submodule 2018-05-31 10:25:42 +02:00
Cargo.lock Update Cargo.lock 2018-06-01 15:00:17 +02:00
Cargo.toml Change the comment on opt-level = 2 to point to https://github.com/rust-lang/rust/issues/50867 2018-05-29 17:38:23 +02:00
README.md
stage0.txt Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • 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: