@@ -2212,17 +2212,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
22122212 interior_span,
22132213 format ! ( "has type `{}` which {}" , target_ty, trait_explanation) ,
22142214 ) ;
2215- // If available, use the scope span to annotate the drop location.
2216- let mut scope_note = None ;
22172215 if let Some ( scope_span) = scope_span {
22182216 let scope_span = source_map. end_point ( scope_span) ;
22192217
22202218 let msg = format ! ( "{} is later dropped here" , snippet) ;
2221- if source_map. is_multiline ( yield_span. between ( scope_span) ) {
2222- span. push_span_label ( scope_span, msg) ;
2223- } else {
2224- scope_note = Some ( ( scope_span, msg) ) ;
2225- }
2219+ span. push_span_label ( scope_span, msg) ;
22262220 }
22272221 err. span_note (
22282222 span,
@@ -2231,9 +2225,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
22312225 future_or_generator, trait_explanation, an_await_or_yield
22322226 ) ,
22332227 ) ;
2234- if let Some ( ( span, msg) ) = scope_note {
2235- err. span_note ( span, & msg) ;
2236- }
22372228 } ;
22382229 match interior_or_upvar_span {
22392230 GeneratorInteriorOrUpvar :: Interior ( interior_span, interior_extra_info) => {
0 commit comments