rust/src
bors 9dc8dad14f Auto merge of #69432 - petrochenkov:alldeps, r=eddyb
rustc_metadata: Load metadata for indirect macro-only dependencies

Imagine this dependency chain between crates
```
Executable crate -> Library crate -> Macro crate
```
where "Library crate" uses the macros from "Macro crate" for some code generation, but doesn't reexport them any further.

Currently, when compiling "Executable crate" we don't even load metadata for it, because why would we want to load any metadata from "Macro crate" if it already did all its code generation job when compiling "Library crate".
Right?

Wrong!
Hygiene data and spans (https://github.com/rust-lang/rust/issues/68686, https://github.com/rust-lang/rust/pull/68941) from "Macro crate" still may need to be decoded from "Executable crate".
So we'll have to load them properly.

Questions:
- How this will affect compile times for larger crate trees in practice? How to measure it?
Hygiene/span encoding/decoding will necessarily slow down compilation because right now we just don't do some work that we should do, but this introduces a whole new way to slow down things. E.g. loading metadata for `syn` (and its dependencies) when compiling your executable if one of its library dependencies uses it.
- We are currently detecting whether a crate reexports macros from "Macro crate" or not, could we similarly detect whether a crate "reexports spans" and keep it unloaded if it doesn't?
Or at least "reexports important spans" affecting hygiene, we can probably lose spans that only affect diagnostics.
2020-03-02 00:07:06 +00:00
..
bootstrap Rollup merge of #69549 - mati865:mingw, r=kennytm 2020-03-01 19:28:07 +09:00
build_helper
ci Rollup merge of #68863 - pietroalbini:azure-macos-10.15, r=Mark-Simulacrum 2020-02-19 18:12:07 +01:00
doc Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
etc Rollup merge of #69049 - pthariensflame:improvement/imgbot, r=GuillaumeGomez 2020-02-13 02:52:53 +01:00
liballoc Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-Simulacrum 2020-03-01 17:23:30 +01:00
libarena
libcore Remove assert that had been replaced by assert_ne 2020-03-01 08:04:18 -08:00
libfmt_macros
libgraphviz Add option to dot::render for monospace font 2020-02-09 10:33:06 -08:00
libpanic_abort
libpanic_unwind Drop cfg(bootstrap) code 2020-01-31 12:31:09 -05:00
libproc_macro
libprofiler_builtins
librustc Auto merge of #69432 - petrochenkov:alldeps, r=eddyb 2020-03-02 00:07:06 +00:00
librustc_apfloat
librustc_ast Make it build again 2020-02-29 20:47:10 +03:00
librustc_ast_lowering Rollup merge of #69580 - matthiaskrgr:map_clone, r=Centril 2020-03-01 19:28:12 +09:00
librustc_ast_passes Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_ast_pretty Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_attr Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_builtin_macros Rollup merge of #69580 - matthiaskrgr:map_clone, r=Centril 2020-03-01 19:28:12 +09:00
librustc_codegen_llvm Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-Simulacrum 2020-03-01 17:23:30 +01:00
librustc_codegen_ssa Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-Simulacrum 2020-03-01 17:23:30 +01:00
librustc_codegen_utils Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_data_structures use is_empty() instead of len() == x to determine if structs are empty. 2020-02-28 15:16:27 +01:00
librustc_driver Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_error_codes Rollup merge of #69607 - GuillaumeGomez:cleanup-e0376, r=Dylan-DPC 2020-03-01 17:23:36 +01:00
librustc_errors Auto merge of #69570 - Dylan-DPC:rollup-d6boczt, r=Dylan-DPC 2020-02-29 10:43:32 +00:00
librustc_expand Rollup merge of #69580 - matthiaskrgr:map_clone, r=Centril 2020-03-01 19:28:12 +09:00
librustc_feature Revert "Mark attributes consumed by check_mod_attrs as normal" 2020-02-27 00:00:00 +00:00
librustc_fs_util
librustc_hir Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_incremental Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_index index ReEmpty by universe 2020-02-06 15:58:00 -05:00
librustc_infer Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-Simulacrum 2020-03-01 17:23:30 +01:00
librustc_interface Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_lexer Spelling error "represening" to "representing" 2020-02-13 11:14:21 -05:00
librustc_lint Auto merge of #69380 - Zoxc:parent-module, r=michaelwoerister 2020-03-01 14:21:03 +00:00
librustc_llvm use char instead of &str for single char patterns 2020-02-27 14:57:22 +01:00
librustc_macros librustc_macros: remove redundant single component path import 2020-02-24 14:56:30 +01:00
librustc_metadata Auto merge of #69432 - petrochenkov:alldeps, r=eddyb 2020-03-02 00:07:06 +00:00
librustc_mir Auto merge of #69408 - RalfJung:canonical-alloc-id, r=oli-obk 2020-03-01 20:53:04 +00:00
librustc_mir_build Auto merge of #69380 - Zoxc:parent-module, r=michaelwoerister 2020-03-01 14:21:03 +00:00
librustc_parse Rollup merge of #69579 - petrochenkov:noprevspan, r=Centril 2020-03-01 19:28:10 +09:00
librustc_passes Auto merge of #69612 - Dylan-DPC:rollup-f180gcc, r=Dylan-DPC 2020-03-01 17:39:05 +00:00
librustc_plugin_impl Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_privacy Auto merge of #69380 - Zoxc:parent-module, r=michaelwoerister 2020-03-01 14:21:03 +00:00
librustc_resolve Auto merge of #69432 - petrochenkov:alldeps, r=eddyb 2020-03-02 00:07:06 +00:00
librustc_save_analysis Rollup merge of #69605 - JohnTitor:opt-def-id, r=petrochenkov 2020-03-01 19:28:15 +09:00
librustc_session Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
librustc_span Rollup merge of #69580 - matthiaskrgr:map_clone, r=Centril 2020-03-01 19:28:12 +09:00
librustc_target Rollup merge of #69549 - mati865:mingw, r=kennytm 2020-03-01 19:28:07 +09:00
librustc_traits Auto merge of #69592 - petrochenkov:nosyntax, r=Centril 2020-03-01 01:36:58 +00:00
librustc_ty Construct AssociatedItems from an iterator instead of a Vec 2020-02-19 12:55:59 -08:00
librustc_typeck Auto merge of #69380 - Zoxc:parent-module, r=michaelwoerister 2020-03-01 14:21:03 +00:00
librustdoc Auto merge of #69612 - Dylan-DPC:rollup-f180gcc, r=Dylan-DPC 2020-03-01 17:39:05 +00:00
libserialize Inline various simple emit_* and read_* methods in Decoder. 2020-02-18 16:46:50 +11:00
libstd Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-Simulacrum 2020-03-01 17:23:30 +01:00
libterm
libtest Rollup merge of #69580 - matthiaskrgr:map_clone, r=Centril 2020-03-01 19:28:12 +09:00
libunwind
llvm-project@9f65ad0573 update llvm to silence gcc 9 warnings 2020-02-26 10:27:01 +08:00
rtstartup
rustc
rustllvm Auto merge of #69144 - Dylan-DPC:rollup-apt6zjj, r=Dylan-DPC 2020-02-13 22:20:58 +00:00
stdarch@dea57529b3 stdarch: update submodule. 2020-02-01 22:04:18 -05:00
test Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomez 2020-03-01 17:23:34 +01:00
tools Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
README.md
stage0.txt Bump rustfmt and stage0 2020-01-31 12:31:09 -05: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.