Module rustc_incremental::assert_module_sources [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This pass is only used for UNIT TESTS related to incremental
compilation. It tests whether a particular .o
file will be re-used
from a previous compilation or whether it must be regenerated.
The user adds annotations to the crate of the following form:
#![rustc_partition_reused(module="spike", cfg="rpass2")] #![rustc_partition_translated(module="spike-x", cfg="rpass2")]
The first indicates (in the cfg rpass2
) that spike.o
will be
reused, the second that spike-x.o
will be recreated. If these
annotations are inaccurate, errors are reported.
The reason that we use cfg=...
and not #[cfg_attr]
is so that
the HIR doesn't change as a result of the annotations, which might
perturb the reuse results.
Re-exports
use rustc::dep_graph::DepNode; |
use rustc::dep_graph::DepConstructor; |
use rustc::mir::mono::CodegenUnit; |
use rustc::ty::TyCtxt; |
use syntax::ast; |
use syntax_pos::symbol::Symbol; |
use rustc::ich::ATTR_PARTITION_REUSED; |
use rustc::ich::ATTR_PARTITION_TRANSLATED; |
Structs
AssertModuleSource |
[ Experimental ]
|
Enums
Disposition |
[ Experimental ]
|
Constants
CFG |
[ Experimental ]
|
MODULE |
[ Experimental ]
|
Functions
assert_module_sources |
[ Experimental ]
|