Access the session directly from DepContext.
This commit is contained in:
parent
83b30a639d
commit
f96e960ccf
9 changed files with 21 additions and 40 deletions
|
@ -26,9 +26,6 @@ use rustc_span::def_id::DefId;
|
|||
pub trait QueryContext: HasDepContext {
|
||||
type Query: Clone + HashStable<Self::StableHashingContext>;
|
||||
|
||||
fn incremental_verify_ich(&self) -> bool;
|
||||
fn verbose(&self) -> bool;
|
||||
|
||||
/// Get string representation from DefPath.
|
||||
fn def_path_str(&self, def_id: DefId) -> String;
|
||||
|
||||
|
@ -43,12 +40,6 @@ pub trait QueryContext: HasDepContext {
|
|||
/// Try to force a dep node to execute and see if it's green.
|
||||
fn try_force_from_dep_node(&self, dep_node: &DepNode<Self::DepKind>) -> bool;
|
||||
|
||||
/// Return whether the current session is tainted by errors.
|
||||
fn has_errors_or_delayed_span_bugs(&self) -> bool;
|
||||
|
||||
/// Return the diagnostic handler.
|
||||
fn diagnostic(&self) -> &rustc_errors::Handler;
|
||||
|
||||
/// Load diagnostics associated to the node in the previous session.
|
||||
fn load_diagnostics(&self, prev_dep_node_index: SerializedDepNodeIndex) -> Vec<Diagnostic>;
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ where
|
|||
|
||||
// If `-Zincremental-verify-ich` is specified, re-hash results from
|
||||
// the cache and make sure that they have the expected fingerprint.
|
||||
if unlikely!(tcx.incremental_verify_ich()) {
|
||||
if unlikely!(tcx.dep_context().sess().opts.debugging_opts.incremental_verify_ich) {
|
||||
incremental_verify_ich(*tcx.dep_context(), &result, dep_node, dep_node_index, query);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue