Rename Session::span_diagnostic as Session::dcx.

This commit is contained in:
Nicholas Nethercote 2023-12-18 06:21:26 +11:00
parent 9df1576e1d
commit 09af8a667c
66 changed files with 176 additions and 204 deletions

View file

@ -3395,7 +3395,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
};
if let Some(diag) =
self.tcx.sess.diagnostic().steal_diagnostic(self.tcx.def_span(def_id), StashKey::Cycle)
self.tcx.sess.dcx().steal_diagnostic(self.tcx.def_span(def_id), StashKey::Cycle)
{
diag.cancel();
}

View file

@ -594,9 +594,7 @@ fn virtual_call_violations_for_method<'tcx>(
// would already have reported an error at the definition of the
// auto trait.
if pred_trait_ref.args.len() != 1 {
tcx.sess
.diagnostic()
.span_delayed_bug(span, "auto traits cannot have generic parameters");
tcx.sess.dcx().span_delayed_bug(span, "auto traits cannot have generic parameters");
}
return false;
}