]> git.lizzy.rs Git - rust.git/commit
Add `#[rustc_clean(loaded_from_disk)]` to assert loading of query result
authorAaron Hill <aa1ronham@gmail.com>
Tue, 21 Dec 2021 21:31:35 +0000 (16:31 -0500)
committerAaron Hill <aa1ronham@gmail.com>
Tue, 21 Dec 2021 21:34:12 +0000 (16:34 -0500)
commitf1d682334d07e125595bb73735b6045bedfb30c4
tree75b6c4b5469f4166668ab3c67721ee0a169240b0
parente100ec5bc7cd768ec17d75448b29c9ab4a39272b
Add `#[rustc_clean(loaded_from_disk)]` to assert loading of query result

Currently, you can use `#[rustc_clean]` to assert to that a particular
query (technically, a `DepNode`) is green or red. However, a green
`DepNode` does not mean that the query result was actually deserialized
from disk - we might have never re-run a query that needed the result.

Some incremental tests are written as regression tests for ICEs that
occured during query result decoding. Using
`#[rustc_clean(loaded_from_disk="typeck")]`, you can now assert
that the result of a particular query (e.g. `typeck`) was actually
loaded from disk, in addition to being green.
compiler/rustc_incremental/src/persist/dirty_clean.rs
compiler/rustc_query_system/src/dep_graph/graph.rs
compiler/rustc_query_system/src/query/plumbing.rs
compiler/rustc_span/src/symbol.rs
src/test/incremental/change_private_fn/struct_point.rs