Skip to content

Commit f604b28

Browse files
committed
Remove unused argument
1 parent 040a5cc commit f604b28

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

compiler/rustc_hir_typeck/src/coercion.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
688688

689689
// Object safety violations or miscellaneous.
690690
Err(err) => {
691-
self.err_ctxt().report_selection_error(
692-
obligation.clone(),
693-
&obligation,
694-
&err,
695-
obligation.cause.span,
696-
);
691+
self.err_ctxt().report_selection_error(obligation.clone(), &obligation, &err);
697692
// Treat this like an obligation and follow through
698693
// with the unsizing - the lack of a coercion should
699694
// be silent, as it causes a type mismatch later.

compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
348348
mut obligation: PredicateObligation<'tcx>,
349349
root_obligation: &PredicateObligation<'tcx>,
350350
error: &SelectionError<'tcx>,
351-
mut span: Span,
352351
) -> ErrorGuaranteed {
353352
let tcx = self.tcx;
353+
let mut span = obligation.cause.span;
354354

355355
if tcx.sess.opts.unstable_opts.next_solver.map(|c| c.dump_tree).unwrap_or_default()
356356
== DumpSolverProofTree::OnError
@@ -1489,7 +1489,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
14891489
error.obligation.clone(),
14901490
&error.root_obligation,
14911491
selection_error,
1492-
error.obligation.cause.span,
14931492
),
14941493
FulfillmentErrorCode::ProjectionError(ref e) => {
14951494
self.report_projection_error(&error.obligation, e)

0 commit comments

Comments
 (0)