Module dirty_clean

Source
Expand description

Debugging code to test fingerprints computed for query results. For each node marked with #[rustc_clean] we will compare the fingerprint from the current and from the previous compilation session as appropriate:

  • #[rustc_clean(cfg="rev2", except="typeck")] if we are in #[cfg(rev2)], then the fingerprints associated with DepNode::typeck(X) must be DIFFERENT (X is the DefId of the current node).

  • #[rustc_clean(cfg="rev2")] same as above, except that the fingerprints must be the SAME (along with all other fingerprints).

  • #[rustc_clean(cfg="rev2", loaded_from_disk='typeck")] asserts that the query result for DepNode::typeck(X) was actually loaded from disk (not just marked green). This can be useful to ensure that a test is actually exercising the deserialization logic for a particular query result. This can be combined with except

Errors are reported if we are in the suitable configuration but the required condition is not met.

Structs§

Assertion 🔒
Represents the requested configuration by rustc_clean/dirty
DirtyCleanVisitor 🔒
FindAllAttrs 🔒
A visitor that collects all #[rustc_clean] attributes from the HIR. It is used to verify that we really ran checks for all annotated nodes.

Constants§

BASE_CONST 🔒
For typedef, constants, and statics
BASE_FN 🔒
DepNodes for functions + methods
BASE_HIR 🔒
DepNodes for Hir, which is pretty much everything
BASE_IMPL 🔒
impl implementation of struct/trait
BASE_MIR 🔒
DepNodes for exported mir bodies, which is relevant in “executable” code, i.e., functions+methods
BASE_STRUCT 🔒
Struct, Enum and Union DepNodes
CFG 🔒
EXCEPT 🔒
EXTRA_ASSOCIATED 🔒
Trait definition DepNodes. Extra DepNodes for functions and methods.
EXTRA_TRAIT 🔒
LABELS_ADT 🔒
Abstract data type (struct, enum, union) DepNodes.
LABELS_CONST 🔒
LABELS_CONST_IN_IMPL 🔒
Constant/Typedef in an impl
LABELS_CONST_IN_TRAIT 🔒
Trait-Const/Typedef DepNodes
LABELS_FN 🔒
Function DepNodes.
LABELS_FN_IN_IMPL 🔒
Method DepNodes.
LABELS_FN_IN_TRAIT 🔒
Trait method DepNodes.
LABELS_HIR_ONLY 🔒
For generic cases like inline-assembly, modules, etc.
LABELS_IMPL 🔒
Impl DepNodes.
LABELS_TRAIT 🔒
Impl DepNodes.
LOADED_FROM_DISK 🔒

Functions§

check_config 🔒
Given a #[rustc_clean] attribute, scan for a cfg="foo" attribute and check whether we have a cfg flag called foo.
check_dirty_clean_annotations 🔒
expect_associated_value 🔒

Type Aliases§

Labels 🔒