rust/src
bors 0d12553320 Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1
Use hir::ItemLocalId as keys in TypeckTables.

This PR makes `TypeckTables` use `ItemLocalId` instead of `NodeId` as key. This is needed for incremental compilation -- for stable hashing and for being able to persist and reload these tables. The PR implements the most important part of https://github.com/rust-lang/rust/issues/40303.

Some notes on the implementation:
* The PR adds the `HirId` to HIR nodes where needed (`Expr`, `Local`, `Block`, `Pat`) which obviates the need to store a `NodeId -> HirId` mapping in crate metadata. Thanks @eddyb for the suggestion! In the future the `HirId` should completely replace the `NodeId` in HIR nodes.
* Before something is read or stored in one of the various `TypeckTables` subtables, the entry's key is validated via the new `TypeckTables::validate_hir_id()` method. This makes sure that we are not mixing information from different items in a single table.

That last part could be made a bit nicer by either (a) new-typing the table-key and making `validate_hir_id()` the only way to convert a `HirId` to the new-typed key, or (b) just encapsulate sub-table access a little better. This PR, however, contents itself with not making things significantly worse.

Also, there's quite a bit of switching around between `NodeId`, `HirId`, and `DefIndex`. These conversions are cheap except for `HirId -> NodeId`, so if the valued reviewer finds such an instance in a performance critical place, please let me know.

Ideally we convert more and more code from `NodeId` to `HirId` in the future so that there are no more `NodeId`s after HIR lowering anywhere. Then the amount of switching should be minimal again.

r? @eddyb, maybe?
2017-08-14 14:15:06 +00:00
..
bootstrap Auto merge of #43842 - bjorn3:no_llvm_cleanup, r=alexcrichton 2017-08-14 02:11:18 +00:00
build_helper rustbuild: Replace create_dir_racy with create_dir_all 2017-08-07 16:04:46 +01:00
ci rustbuild: Remove --enable-llvm-clean-rebuild 2017-07-30 13:50:19 -07:00
doc Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichton 2017-08-13 03:00:20 +00:00
etc Add support for Vector Average on PowerPC 2017-08-07 07:44:27 +00:00
grammar changed upper bound digit in octal rule to 7 2017-06-13 17:08:12 -03:00
jemalloc@11bfb0dcf8 Revert "Update jemalloc to 4.5.0" 2017-06-09 20:23:38 +02:00
liballoc Auto merge of #43815 - alexcrichton:optimize-alloc, r=sfackler 2017-08-13 19:28:57 +00:00
liballoc_jemalloc Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
liballoc_system Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
libarena Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
libbacktrace
libcollections rustc: Implement the #[global_allocator] attribute 2017-07-05 14:37:01 -07:00
libcompiler_builtins@5e49856003 Update compiler_builtins submodule for probestack fix 2017-07-07 21:11:35 -07:00
libcore Auto merge of #43856 - sfackler:no-inline-debug, r=alexcrichton 2017-08-14 07:50:36 +00:00
libfmt_macros Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
libgetopts Switch to the crates.io getopts crate 2017-06-20 12:43:12 -07:00
libgraphviz Fix some typos 2017-08-12 14:01:11 +02:00
liblibc@2a5b50b7f7 addrinfo hint in lookup_host() needs clean initialization on all platforms 2017-08-07 09:07:26 -07:00
libpanic_abort
libpanic_unwind std: Avoid panics in rust_eh_personality 2017-06-08 07:06:43 -07:00
libproc_macro Fix some more typos, this time words that are duplicated. 2017-08-11 00:31:47 +02:00
libprofiler_builtins Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librand Delete deprecated & unstable range-specific step_by 2017-07-01 19:18:02 -07:00
librustc Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_allocator syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros. 2017-08-12 09:14:50 +03:00
librustc_apfloat rustc_apfloat: complete the IEEE & PPC implementations. 2017-08-02 03:45:03 +03:00
librustc_asan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_back Add L4Re Support in librustc_back 2017-08-04 08:59:01 +02:00
librustc_bitflags Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_borrowck Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_const_eval Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_const_math rustc_const_math: use apfloat::ieee::{Single,Double} in ConstFloat. 2017-08-02 17:28:11 +03:00
librustc_data_structures Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_driver Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_errors fix -Z treat-err-as-bug 2017-07-31 18:09:02 +03:00
librustc_incremental async-llvm(18): Instantiate OngoingCrateTranslation before starting translation. 2017-07-31 15:15:09 +02:00
librustc_lint Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_llvm Auto merge of #43554 - eddyb:apfloat, r=nikomatsakis 2017-08-05 13:12:56 +00:00
librustc_lsan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_metadata Rollup merge of #43739 - ibabushkin:master, r=eddyb 2017-08-11 10:20:22 +02:00
librustc_mir Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_msan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_passes Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_platform_intrinsics Add support for Vector Average on PowerPC 2017-08-07 07:44:27 +00:00
librustc_plugin syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros. 2017-08-12 09:14:50 +03:00
librustc_privacy Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_resolve Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkov 2017-08-13 11:03:11 +02:00
librustc_save_analysis Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustc_trans Auto merge of #43836 - taleks:issue-39827, r=arielb1 2017-08-13 23:33:18 +00:00
librustc_trans_utils Less cfg's 2017-08-12 10:54:36 +02:00
librustc_tsan rustc_{a,l,m,t}san: re-run build script if env var LLVM_CONFIG changes 2017-06-30 17:35:00 +00:00
librustc_typeck Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1 2017-08-14 14:15:06 +00:00
librustdoc Rollup merge of #43782 - nrc:include, r=GuillaumeGomez 2017-08-13 11:03:09 +02:00
libserialize Fix some doc/comment typos. 2017-07-23 22:48:01 +07:00
libstd Rollup merge of #43833 - dtolnay:connect-timeout, r=sfackler 2017-08-13 11:03:15 +02:00
libstd_unicode Auto merge of #42998 - behnam:uni-ver-type, r=sfackler 2017-08-08 06:48:45 +00:00
libsyntax Rollup merge of #43822 - topecongiro:missing-span-let, r=petrochenkov 2017-08-13 11:03:13 +02:00
libsyntax_ext syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros. 2017-08-12 09:14:50 +03:00
libsyntax_pos syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros. 2017-08-12 09:14:50 +03:00
libterm Fix checking for missing stability annotations 2017-07-16 23:15:07 +03:00
libtest Reduce the usage of features in compiletest and libtest 2017-07-13 16:37:57 +02:00
libunwind
llvm@d9e7d2696e Fix LLVM assertion when a weak symbol is defined in global_asm. 2017-07-18 16:52:00 +03:00
rt Remove the in-tree flate crate 2017-06-20 07:11:29 -07:00
rtstartup
rustc Make librustc_driver work without librustc_trans 2017-08-11 10:38:31 +02:00
rustllvm Fix covered-switch-default warnings in PassWrapper 2017-08-08 16:17:33 +08:00
test Mark closures return via impl-trait as reachable. 2017-08-14 12:04:52 +02:00
tools Cargotest needs only one rustdoc.exe to exist on Windows 2017-08-13 05:15:44 +05:00
Cargo.lock Remove some unused dependencies from rustc_trans_utils 2017-08-11 14:00:09 +02:00
Cargo.toml Build rustdoc on-demand. 2017-07-27 05:51:22 -06:00
stage0.txt Bump master to 1.21.0 2017-07-25 07:03:19 -07:00