Skip to main content

rustc_incremental/
lib.rs

1//! Support for serializing the dep-graph and reloading it.
2
3// tidy-alphabetical-start
4#![deny(missing_docs)]
5#![feature(file_buffered)]
6#![feature(try_blocks)]
7// tidy-alphabetical-end
8
9mod assert_dep_graph;
10mod diagnostics;
11mod persist;
12
13pub use persist::{
14    copy_cgu_workproduct_to_incr_comp_cache_dir, finalize_session_directory, in_incr_comp_dir_sess,
15    in_old_incr_comp_dir_sess, load_query_result_cache, save_work_product_index, setup_dep_graph,
16};
17use rustc_middle::util::Providers;
18
19#[allow(missing_docs)]
20pub fn provide(providers: &mut Providers) {
21    providers.hooks.save_dep_graph =
22        |tcx| tcx.sess.time("serialize_dep_graph", || persist::save_dep_graph(tcx));
23}