1
Fork 0

Remove more Session methods that duplicate DiagCtxt methods.

This commit is contained in:
Nicholas Nethercote 2023-12-21 16:26:09 +11:00
parent 8af3d8dcab
commit 8a9db25459
36 changed files with 62 additions and 74 deletions

View file

@ -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")
}

View file

@ -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 => {

View file

@ -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!(