1
Fork 0

Use head span for rustc_on_unimplemented's enclosing_scope attr

This commit is contained in:
Michael Goulet 2022-09-01 19:52:39 +00:00
parent 84f0c3f79a
commit c23fe81764
8 changed files with 120 additions and 197 deletions

View file

@ -526,7 +526,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
});
let enclosing_scope_span =
tcx.hir().span_with_body(tcx.hir().local_def_id_to_hir_id(body));
tcx.hir().span(tcx.hir().local_def_id_to_hir_id(body));
err.span_label(enclosing_scope_span, s);
}