Access the session directly from DepContext.

This commit is contained in:
Camille GILLOT 2020-11-12 20:48:37 +01:00
parent 83b30a639d
commit f96e960ccf
9 changed files with 21 additions and 40 deletions

View file

@ -47,13 +47,6 @@ impl HasDepContext for QueryCtxt<'tcx> {
impl QueryContext for QueryCtxt<'tcx> {
type Query = Query<'tcx>;
fn incremental_verify_ich(&self) -> bool {
self.sess.opts.debugging_opts.incremental_verify_ich
}
fn verbose(&self) -> bool {
self.sess.verbose()
}
fn def_path_str(&self, def_id: DefId) -> String {
self.tcx.def_path_str(def_id)
}
@ -132,14 +125,6 @@ impl QueryContext for QueryCtxt<'tcx> {
(cb.force_from_dep_node)(*self, dep_node)
}
fn has_errors_or_delayed_span_bugs(&self) -> bool {
self.sess.has_errors_or_delayed_span_bugs()
}
fn diagnostic(&self) -> &rustc_errors::Handler {
self.sess.diagnostic()
}
// Interactions with on_disk_cache
fn load_diagnostics(&self, prev_dep_node_index: SerializedDepNodeIndex) -> Vec<Diagnostic> {
self.on_disk_cache