@@ -21,7 +21,7 @@ use tracing::{debug, instrument};
2121
2222use crate :: borrow_set:: BorrowSet ;
2323use crate :: consumers:: ConsumerOptions ;
24- use crate :: diagnostics:: { BorrowckDiagnosticsBuffer , RegionErrors } ;
24+ use crate :: diagnostics:: RegionErrors ;
2525use crate :: polonius:: PoloniusDiagnosticsContext ;
2626use crate :: polonius:: legacy:: {
2727 PoloniusFacts , PoloniusFactsExt , PoloniusLocationTable , PoloniusOutput ,
@@ -297,7 +297,6 @@ pub(super) fn dump_annotation<'tcx, 'infcx>(
297297 body : & Body < ' tcx > ,
298298 regioncx : & RegionInferenceContext < ' tcx > ,
299299 closure_region_requirements : & Option < ClosureRegionRequirements < ' tcx > > ,
300- diagnostics_buffer : & mut BorrowckDiagnosticsBuffer < ' infcx , ' tcx > ,
301300) {
302301 let tcx = infcx. tcx ;
303302 let base_def_id = tcx. typeck_root_def_id ( body. source . def_id ( ) ) ;
@@ -335,13 +334,11 @@ pub(super) fn dump_annotation<'tcx, 'infcx>(
335334 } else {
336335 let mut err = infcx. dcx ( ) . struct_span_note ( def_span, "no external requirements" ) ;
337336 regioncx. annotate ( tcx, & mut err) ;
338-
339337 err
340338 } ;
341339
342340 // FIXME(@lcnr): We currently don't dump the inferred hidden types here.
343-
344- diagnostics_buffer. buffer_non_error ( err) ;
341+ err. emit ( ) ;
345342}
346343
347344fn for_each_region_constraint < ' tcx > (
0 commit comments