use mir;
use session::CompileResult;
use ty::{self, CrateInherentImpls, Ty, TyCtxt};
+use util::nodemap::NodeSet;
use rustc_data_structures::indexed_vec::IndexVec;
use std::cell::{RefCell, RefMut};
}
}
+impl<'tcx> QueryDescription for queries::reachable_set<'tcx> {
+ fn describe(_: TyCtxt, _: CrateNum) -> String {
+ format!("reachability")
+ }
+}
macro_rules! define_maps {
(<$tcx:tt>
pub coherent_trait: coherent_trait_dep_node((CrateNum, DefId)) -> (),
+ pub borrowck: BorrowCheck(DefId) -> (),
+
/// Gets a complete map from all types to their inherent impls.
/// Not meant to be used directly outside of coherence.
/// (Defined only for LOCAL_CRATE)
/// Performs the privacy check and computes "access levels".
pub privacy_access_levels: PrivacyAccessLevels(CrateNum) -> Rc<AccessLevels>,
+ pub reachable_set: reachability_dep_node(CrateNum) -> NodeSet,
+
pub mir_shims: mir_shim(ty::InstanceDef<'tcx>) -> &'tcx RefCell<mir::Mir<'tcx>>
}
DepNode::Coherence
}
+fn reachability_dep_node(_: CrateNum) -> DepNode<DefId> {
+ DepNode::Reachability
+}
+
fn mir_shim(instance: ty::InstanceDef) -> DepNode<DefId> {
instance.dep_node()
}