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
- Dirty
Clean πVisitor - Find
AllAttrs π - 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
- LABELS_
CONST_ πIN_ TRAIT - 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
. - check_
dirty_ πclean_ annotations - expect_
associated_ πvalue
Type AliasesΒ§
- Labels π