]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #37408 - eddyb:lazy-5, r=nikomatsakis
authorAlex Crichton <alex@alexcrichton.com>
Fri, 4 Nov 2016 23:49:28 +0000 (16:49 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 23:49:28 +0000 (16:49 -0700)
commit1a0963292aa6d78a4de05dbee853d0efe6cefe8a
treed26617dc78f4b280ab0198147a92d114f80877f6
parent0f6a71e3e030bbf59819faf9457e3e71361fbc94
parent0d7201ef46b9bdf8474b07b839d029e56d4f29b7
Rollup merge of #37408 - eddyb:lazy-5, r=nikomatsakis

[5/n] rustc: record the target type of every adjustment.

_This is part of a series ([prev](https://github.com/rust-lang/rust/pull/37404) | [next](https://github.com/rust-lang/rust/pull/37412)) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well.
If any motivation is unclear, please ask for additional PR description clarifications or code comments._

<hr>

The first commit rearranges `tcx.tables` so that all users go through `tcx.tables()`. This in preparation for per-body `Tables` where they will be requested for a specific `DefId`. Included to minimize churn.

The rest of the changes focus on adjustments, there are some renamings, but the main addition is the target type, always available in all cases (as opposed to just for unsizing where it was previously needed).

Possibly the most significant effect of this change is that figuring out the final type of an expression is now _always_ just one successful `HashMap` lookup (either the adjustment or, if that doesn't exist, the node type).
src/librustc/infer/mod.rs
src/librustc/util/ppaux.rs
src/librustc_driver/pretty.rs
src/librustc_lint/builtin.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/regionck.rs
src/librustc_typeck/lib.rs