1
Fork 0

review comment: change span argument

This commit is contained in:
Esteban Küber 2024-10-27 19:23:21 +00:00
parent d2a781a2ec
commit d116767113
6 changed files with 15 additions and 10 deletions

View file

@ -642,7 +642,6 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
);
let hir = tcx.hir();
infcx.err_ctxt().note_type_err(
cause.span,
&mut diag,
&cause,
hir.get_if_local(impl_m.def_id)
@ -654,6 +653,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
}))),
terr,
false,
None,
);
return Err(diag.emit());
}
@ -1062,7 +1062,6 @@ fn report_trait_method_mismatch<'tcx>(
cause.span = impl_err_span;
infcx.err_ctxt().note_type_err(
cause.span,
&mut diag,
&cause,
trait_err_span.map(|sp| (sp, Cow::from("type in trait"), false)),
@ -1072,6 +1071,7 @@ fn report_trait_method_mismatch<'tcx>(
}))),
terr,
false,
None,
);
diag.emit()
@ -1855,7 +1855,6 @@ fn compare_const_predicate_entailment<'tcx>(
});
infcx.err_ctxt().note_type_err(
cause.span,
&mut diag,
&cause,
trait_c_span.map(|span| (span, Cow::from("type in trait"), false)),
@ -1865,6 +1864,7 @@ fn compare_const_predicate_entailment<'tcx>(
}))),
terr,
false,
None,
);
return Err(diag.emit());
};

View file

@ -640,7 +640,6 @@ pub fn check_function_signature<'tcx>(
let failure_code = cause.as_failure_code_diag(err, cause.span, vec![]);
let mut diag = tcx.dcx().create_err(failure_code);
err_ctxt.note_type_err(
cause.span,
&mut diag,
&cause,
None,
@ -650,6 +649,7 @@ pub fn check_function_signature<'tcx>(
}))),
err,
false,
None,
);
return Err(diag.emit());
}