1 //! Support for serializing the dep-graph and reloading it.
3 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
4 #![feature(in_band_lifetimes)]
6 #![feature(min_specialization)]
7 #![feature(rustc_attrs)]
8 #![recursion_limit = "256"]
11 extern crate rustc_middle;
15 use rustc_data_structures::fingerprint::Fingerprint;
16 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
17 use rustc_errors::{DiagnosticBuilder, Handler};
18 use rustc_middle::dep_graph;
19 use rustc_middle::ich::StableHashingContext;
20 use rustc_middle::ty::query::{query_keys, query_storage, query_stored, query_values};
21 use rustc_middle::ty::query::{Providers, QueryEngine};
22 use rustc_middle::ty::{self, TyCtxt};
23 use rustc_serialize::opaque;
28 pub use plumbing::QueryCtxt;
29 use plumbing::QueryStruct;
30 use rustc_query_system::query::*;
33 pub use self::stats::print_stats;
39 use self::values::Value;
41 use rustc_query_system::query::QueryAccessors;
42 pub use rustc_query_system::query::QueryConfig;
43 pub(crate) use rustc_query_system::query::QueryDescription;
45 use rustc_middle::ty::query::on_disk_cache;
47 mod profiling_support;
48 pub use self::profiling_support::alloc_self_profile_query_strings;
50 rustc_query_append! { [define_queries!][<'tcx>] }
52 impl<'tcx> Queries<'tcx> {
53 // Force codegen in the dyn-trait transformation in this crate.
54 pub fn as_dyn(&'tcx self) -> &'tcx dyn QueryEngine<'tcx> {