Skip to content

Commit f3618d8

Browse files
committed
Auto merge of #126623 - oli-obk:do_not_count_errors, r=davidtwco
Replace all `&DiagCtxt` with a `DiagCtxtHandle<'_>` wrapper type r? `@davidtwco` This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle Basically I will add a field to the `DiagCtxtHandle` that refers back to the `InferCtxt`'s (and others) `Option<ErrorHandled>`, allowing us to immediately taint these contexts when emitting an error and not needing manual tainting anymore (which is easy to forget and we don't do in general anyway)
2 parents 1b8e766 + 23dbcd5 commit f3618d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ pub fn report_msg<'tcx>(
566566
let is_local = machine.is_local(frame_info);
567567
// No span for non-local frames and the first frame (which is the error site).
568568
if is_local && idx > 0 {
569-
err.subdiagnostic(err.dcx, frame_info.as_note(machine.tcx));
569+
err.subdiagnostic(frame_info.as_note(machine.tcx));
570570
} else {
571571
let sm = sess.source_map();
572572
let span = sm.span_to_embeddable_string(frame_info.span);

0 commit comments

Comments
 (0)