rustc_incremental/
lib.rs

1//! Support for serializing the dep-graph and reloading it.
2
3// tidy-alphabetical-start
4#![allow(internal_features)]
5#![deny(missing_docs)]
6#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
7#![doc(rust_logo)]
8#![feature(file_buffered)]
9#![feature(rustdoc_internals)]
10#![warn(unreachable_pub)]
11// tidy-alphabetical-end
12
13mod assert_dep_graph;
14mod errors;
15mod persist;
16
17pub use persist::{
18    LoadResult, copy_cgu_workproduct_to_incr_comp_cache_dir, finalize_session_directory,
19    in_incr_comp_dir, in_incr_comp_dir_sess, load_query_result_cache, save_work_product_index,
20    setup_dep_graph,
21};
22use rustc_middle::util::Providers;
23
24#[allow(missing_docs)]
25pub fn provide(providers: &mut Providers) {
26    providers.hooks.save_dep_graph =
27        |tcx| tcx.sess.time("serialize_dep_graph", || persist::save_dep_graph(tcx));
28}
29
30rustc_fluent_macro::fluent_messages! { "../messages.ftl" }