rust/src
bors 40e4b6ee3d Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton
resolve: Implement prelude search for macro paths, implement tool attributes

When identifier is macro path is resolved in scopes (i.e. the first path segment - `foo` in `foo::mac!()` or `foo!()`), scopes are searched in the same order as for non-macro paths - items in modules, extern prelude, tool prelude (see later), standard library prelude, language prelude, but with some extra shadowing restrictions (names from globs and macro expansions cannot shadow names from outer scopes). See the comment in `fn resolve_lexical_macro_path_segment` for more details.

"Tool prelude" currently contains two "tool modules" `rustfmt` and `clippy`, and is searched immediately after extern prelude.
This makes the [possible long-term solution](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md#long-term-solution) for tool attributes exactly equivalent to the existing extern prelude scheme, except that `--extern=my_crate` making crate names available in scope is replaced with something like `--tool=my_tool` making tool names available in scope.

The `tool_attributes` feature is still unstable and `#![feature(tool_attributes)]` now implicitly enables `#![feature(use_extern_macros)]`. `use_extern_macros` is a prerequisite for `tool_attributes`, so their stabilization will happen in the same order.
If `use_extern_macros` is not enabled, then tool attributes are treated as custom attributes (this is temporary, anyway).

Fixes https://github.com/rust-lang/rust/issues/52576
Fixes https://github.com/rust-lang/rust/issues/52512
Fixes https://github.com/rust-lang/rust/issues/51277
cc https://github.com/rust-lang/rust/issues/52269
2018-08-02 21:39:14 +00:00
..
bootstrap Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton 2018-08-02 15:34:21 +00:00
build_helper Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
ci [RISCV] Enable CI. 2018-08-01 15:34:57 +02:00
dlmalloc@c99638dc2e
doc Rollup merge of #52831 - dsciarra:rm-ref-to-author-file, r=alexcrichton 2018-08-01 10:12:47 +02:00
etc fix coding style 2018-07-29 23:45:32 +09:00
grammar
jemalloc@1f5a28755e
liballoc Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton 2018-08-02 15:34:21 +00:00
liballoc_jemalloc enable jemalloc assertions when configured to do so 2018-07-31 17:01:39 +02:00
liballoc_system Fix coding style. 2018-07-31 09:49:10 +02:00
libarena Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
libbacktrace@f4d02bbdbf
libcompiler_builtins@52a6a4d708 Update the compiler-builtins submodule 2018-07-25 18:12:39 -07:00
libcore Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton 2018-08-02 15:34:21 +00:00
libfmt_macros Remove unused muts 2018-07-29 18:04:09 +01:00
libgraphviz Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
liblibc@b6d23ed45d Update liblibc 2018-07-01 20:23:41 +02:00
libpanic_abort Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
libpanic_unwind Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
libproc_macro Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
libprofiler_builtins Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton 2018-08-02 21:39:14 +00:00
librustc_allocator Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_apfloat Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_asan Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_borrowck Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov 2018-07-30 06:29:39 +00:00
librustc_codegen_llvm Rollup merge of #52799 - Mark-Simulacrum:attr-id-bitvecs, r=michaelwoerister 2018-08-01 21:46:23 +02:00
librustc_codegen_utils Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_cratesio_shim
librustc_data_structures Rollup merge of #52942 - llogiq:smallvec-opt, r=Mark-Simulacrum 2018-08-01 21:46:37 +02:00
librustc_driver Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov 2018-07-30 06:29:39 +00:00
librustc_errors rustc: Disallow machine applicability in foreign macros 2018-07-30 07:48:59 -07:00
librustc_incremental Don't format!() string literals 2018-07-28 17:58:52 +02:00
librustc_lint rustc: Trim down the rust_2018_idioms lint group 2018-08-01 07:29:24 -07:00
librustc_llvm [RISCV] Enable LLVM backend. 2018-08-01 15:32:22 +02:00
librustc_lsan Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_metadata Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov 2018-07-30 06:29:39 +00:00
librustc_mir Auto merge of #52782 - pnkfelix:issue-45696-dangly-paths-for-box, r=eddyb 2018-08-02 19:42:19 +00:00
librustc_msan Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_passes Change order of copy and borrow to avoid conflict 2018-07-29 18:04:09 +01:00
librustc_platform_intrinsics Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_plugin Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_privacy Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_resolve Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton 2018-08-02 21:39:14 +00:00
librustc_save_analysis resolve: Implement prelude search for macro paths 2018-08-01 12:08:41 +03:00
librustc_target [RISCV] Disable c extension and atomic_cas. 2018-08-01 15:34:57 +02:00
librustc_traits Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkov 2018-07-29 09:33:37 +00:00
librustc_tsan Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
librustc_typeck Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov 2018-07-30 06:29:39 +00:00
librustdoc Rollup merge of #52835 - GuillaumeGomez:ice-rustdoc-links, r=eddyb 2018-08-01 21:46:27 +02:00
libserialize Rollup merge of #52778 - ljedrz:readable_serialize, r=kennytm 2018-08-01 10:12:40 +02:00
libstd Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton 2018-08-02 15:34:21 +00:00
libsyntax Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton 2018-08-02 21:39:14 +00:00
libsyntax_ext Rollup merge of #52888 - estebank:shell-sugg, r=oli-obk 2018-08-01 10:13:02 +02:00
libsyntax_pos Switch to bootstrapping from 1.29 beta 2018-08-01 11:59:08 -06:00
libterm Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkov 2018-07-29 09:33:37 +00:00
libtest Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov 2018-07-30 06:29:39 +00:00
libunwind Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
llvm@0368490510 Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
llvm-emscripten@2717444753
rtstartup
rustc
rustllvm Auto merge of #52787 - riscv-rust:riscv-rust-pr, r=alexcrichton 2018-08-02 02:24:15 +00:00
stdsimd@05c2f61c38 update the stdsimd submodule 2018-07-24 11:08:11 -05:00
test Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton 2018-08-02 21:39:14 +00:00
tools [RISCV] Enable CI. 2018-08-01 15:34:57 +02:00
Cargo.lock Rollup merge of #52732 - SimonSapin:spring, r=Mark-Simulacrum 2018-08-01 10:12:36 +02:00
Cargo.toml Update RLS and rustfmt. 2018-07-29 19:05:42 +08:00
README.md
stage0.txt Switch to bootstrapping from 1.29 beta 2018-08-01 11:59:08 -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: