Rename Session::span_diagnostic as Session::dcx.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user