remove tcx from ObligationCauseCode::span

This commit is contained in:
Michael Goulet
2022-07-08 02:02:08 +00:00
parent 27b6ab9129
commit 78efaf43e4
10 changed files with 12 additions and 18 deletions

View File

@@ -27,10 +27,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
if let Some(span) = self.tcx.hir().span_if_local(trait_item_def_id) {
let item_name = self.tcx.item_name(impl_item_def_id.to_def_id());
err.span_label(
span,
format!("definition of `{}` from trait", item_name),
);
err.span_label(span, format!("definition of `{}` from trait", item_name));
}
err.span_label(error_span, format!("impl has extra requirement {}", requirement));