rust/compiler/rustc_middle
Aaron Hill c2946402ff
Properly re-use def path hash in incremental mode
Fixes #79661

In incremental compilation mode, we update a `DefPathHash -> DefId`
mapping every time we create a `DepNode` for a foreign `DefId`.
This mapping is written out to the on-disk incremental cache, and is
read by the next compilation session to allow us to lazily decode
`DefId`s.

When we decode a `DepNode` from the current incremental cache, we need
to ensure that any previously-recorded `DefPathHash -> DefId` mapping
gets recorded in the new mapping that we write out. However, PR #74967
didn't do this in all cases, leading to us being unable to decode a
`DefPathHash` in certain circumstances.

This PR refactors some of the code around `DepNode` deserialization to
prevent this kind of mistake from happening again.
2020-12-04 22:16:40 -05:00
..
benches mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
src Properly re-use def path hash in incremental mode 2020-12-04 22:16:40 -05:00
Cargo.toml Address review comment and update chalk to 0.36.0 2020-10-30 19:39:33 +00:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

For more information about how rustc works, see the rustc dev guide.