Module rustc_incremental::persist::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 withDepNode::typeck(X)
must be DIFFERENT (X
is theDefId
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 forDepNode::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 withexcept
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
- 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
DepNode
s. ExtraDepNode
s for functions and methods. - EXTRA_TRAIT π
- LABELS_ADT πAbstract data type (struct, enum, union)
DepNode
s. - LABELS_CONST π
- LABELS_CONST_IN_IMPL πConstant/Typedef in an impl
- Trait-Const/Typedef DepNodes
- LABELS_FN πFunction
DepNode
s. - LABELS_FN_IN_IMPL πMethod
DepNode
s. - LABELS_FN_IN_TRAIT πTrait method
DepNode
s. - LABELS_HIR_ONLY πFor generic cases like inline-assembly, modules, etc.
- LABELS_IMPL πImpl
DepNode
s. - LABELS_TRAIT πImpl
DepNode
s. - LOADED_FROM_DISK π
Functions§
- check_config πGiven a
#[rustc_clean]
attribute, scan for acfg="foo"
attribute and check whether we have a cfg flag calledfoo
.
Type Aliases§
- Labels π