diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-21 16:26:09 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:17:47 +1100 |
| commit | 8a9db2545919f945ffbb215e4325917e0bfc5b3a (patch) | |
| tree | 435bcdd5e90f99b23e52f76535996e27c42ccf06 /compiler/rustc_query_system | |
| parent | 8af3d8dcabc8970615dd386df7fde13c5794f004 (diff) | |
Remove more `Session` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/values.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 3556a5ec1d1..9b06823dfba 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -818,7 +818,7 @@ impl<D: Deps> DepGraphData<D> { None => {} } - if let None = qcx.dep_context().sess().has_errors_or_span_delayed_bugs() { + if let None = qcx.dep_context().sess().dcx().has_errors_or_span_delayed_bugs() { panic!("try_mark_previous_green() - Forcing the DepNode should have set its color") } diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index bcd507ad76c..34f2c01f890 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -126,7 +126,7 @@ where } Fatal => { error.emit(); - qcx.dep_context().sess().abort_if_errors(); + qcx.dep_context().sess().dcx().abort_if_errors(); unreachable!() } DelayBug => { diff --git a/compiler/rustc_query_system/src/values.rs b/compiler/rustc_query_system/src/values.rs index 8848fda9da3..4f1c182cdb8 100644 --- a/compiler/rustc_query_system/src/values.rs +++ b/compiler/rustc_query_system/src/values.rs @@ -9,7 +9,7 @@ pub trait Value<Tcx: DepContext>: Sized { impl<Tcx: DepContext, T> Value<Tcx> for T { default fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo], _guar: ErrorGuaranteed) -> T { - tcx.sess().abort_if_errors(); + tcx.sess().dcx().abort_if_errors(); // Ideally we would use `bug!` here. But bug! is only defined in rustc_middle, and it's // non-trivial to define it earlier. panic!( |
