Rename Session::span_diagnostic
as Session::dcx
.
This commit is contained in:
parent
9df1576e1d
commit
09af8a667c
66 changed files with 176 additions and 204 deletions
|
@ -376,7 +376,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
TypeAnnotationNeeded::E0283 => AmbiguousImpl {
|
||||
span,
|
||||
source_kind,
|
||||
|
@ -386,7 +386,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
TypeAnnotationNeeded::E0284 => AmbiguousReturn {
|
||||
span,
|
||||
source_kind,
|
||||
|
@ -396,7 +396,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label: None,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
TypeAnnotationNeeded::E0283 => AmbiguousImpl {
|
||||
span,
|
||||
source_kind,
|
||||
|
@ -593,7 +593,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label: None,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
TypeAnnotationNeeded::E0284 => AmbiguousReturn {
|
||||
span,
|
||||
source_kind,
|
||||
|
@ -603,7 +603,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
multi_suggestions,
|
||||
bad_label: None,
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic()),
|
||||
.into_diagnostic(self.tcx.sess.dcx()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
span,
|
||||
notes: reference_valid.into_iter().chain(content_valid).collect(),
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
infer::RelateObjectBound(span) => {
|
||||
let object_valid = note_and_explain::RegionExplanation::new(
|
||||
|
@ -161,7 +161,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
span,
|
||||
notes: object_valid.into_iter().chain(pointer_valid).collect(),
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
infer::RelateParamBound(span, ty, opt_span) => {
|
||||
let prefix = match *sub {
|
||||
|
@ -177,7 +177,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
self.tcx, sub, opt_span, prefix, suffix,
|
||||
);
|
||||
FulfillReqLifetime { span, ty: self.resolve_vars_if_possible(ty), note }
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
infer::RelateRegionParamBound(span) => {
|
||||
let param_instantiated = note_and_explain::RegionExplanation::new(
|
||||
|
@ -198,7 +198,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
span,
|
||||
notes: param_instantiated.into_iter().chain(param_must_outlive).collect(),
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
infer::ReferenceOutlivesReferent(ty, span) => {
|
||||
let pointer_valid = note_and_explain::RegionExplanation::new(
|
||||
|
@ -220,7 +220,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
ty: self.resolve_vars_if_possible(ty),
|
||||
notes: pointer_valid.into_iter().chain(data_valid).collect(),
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
infer::CompareImplItemObligation { span, impl_item_def_id, trait_item_def_id } => {
|
||||
let mut err = self.report_extra_impl_obligation(
|
||||
|
@ -281,7 +281,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
span,
|
||||
notes: instantiated.into_iter().chain(must_outlive).collect(),
|
||||
}
|
||||
.into_diagnostic(self.tcx.sess.diagnostic())
|
||||
.into_diagnostic(self.tcx.sess.dcx())
|
||||
}
|
||||
};
|
||||
if sub.is_error() || sup.is_error() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue