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)]
5 #![feature(exhaustive_patterns)]
7 #![feature(min_specialization)]
8 #![feature(crate_visibility_modifier)]
10 #![feature(rustc_attrs)]
11 #![feature(never_type)]
12 #![recursion_limit = "256"]
15 extern crate rustc_middle
;
19 use rustc_data_structures
::fingerprint
::Fingerprint
;
20 use rustc_data_structures
::stable_hasher
::{HashStable, StableHasher}
;
21 use rustc_errors
::{DiagnosticBuilder, Handler}
;
22 use rustc_hir
::def_id
::CrateNum
;
23 use rustc_index
::vec
::IndexVec
;
24 use rustc_middle
::dep_graph
;
25 use rustc_middle
::ich
::StableHashingContext
;
26 use rustc_middle
::ty
::query
::{query_keys, query_storage, query_stored, query_values}
;
27 use rustc_middle
::ty
::query
::{Providers, QueryEngine}
;
28 use rustc_middle
::ty
::{self, TyCtxt}
;
29 use rustc_serialize
::opaque
;
30 use rustc_span
::{Span, DUMMY_SP}
;
34 pub use plumbing
::QueryCtxt
;
35 use plumbing
::QueryStruct
;
36 use rustc_query_system
::query
::*;
39 pub use self::stats
::print_stats
;
45 use self::values
::Value
;
47 use rustc_query_system
::query
::QueryAccessors
;
48 pub use rustc_query_system
::query
::QueryConfig
;
49 pub(crate) use rustc_query_system
::query
::QueryDescription
;
51 use rustc_middle
::ty
::query
::on_disk_cache
;
53 mod profiling_support
;
54 pub use self::profiling_support
::alloc_self_profile_query_strings
;
56 rustc_query_append
! { [define_queries!][<'tcx>] }
58 impl<'tcx
> Queries
<'tcx
> {
59 // Force codegen in the dyn-trait transformation in this crate.
60 pub fn as_dyn(&'tcx
self) -> &'tcx
dyn QueryEngine
<'tcx
> {