@@ -2212,17 +2212,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
2212
2212
interior_span,
2213
2213
format ! ( "has type `{}` which {}" , target_ty, trait_explanation) ,
2214
2214
) ;
2215
- // If available, use the scope span to annotate the drop location.
2216
- let mut scope_note = None ;
2217
2215
if let Some ( scope_span) = scope_span {
2218
2216
let scope_span = source_map. end_point ( scope_span) ;
2219
2217
2220
2218
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) ;
2226
2220
}
2227
2221
err. span_note (
2228
2222
span,
@@ -2231,9 +2225,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
2231
2225
future_or_generator, trait_explanation, an_await_or_yield
2232
2226
) ,
2233
2227
) ;
2234
- if let Some ( ( span, msg) ) = scope_note {
2235
- err. span_note ( span, & msg) ;
2236
- }
2237
2228
} ;
2238
2229
match interior_or_upvar_span {
2239
2230
GeneratorInteriorOrUpvar :: Interior ( interior_span, interior_extra_info) => {
0 commit comments