Remove two unnecessary clone() calls.

This commit is contained in:
Nicholas Nethercote 2019-09-09 08:25:54 +10:00
parent 2b8116dced
commit 36b37e22de
2 changed files with 4 additions and 4 deletions

View File

@ -529,11 +529,11 @@ fn check_supplied_sig_against_expectation(
); // recreated from (*) above
// Check that E' = S'.
let cause = &self.misc(hir_ty.span);
let cause = self.misc(hir_ty.span);
let InferOk {
value: (),
obligations,
} = self.at(cause, self.param_env)
} = self.at(&cause, self.param_env)
.eq(*expected_ty, supplied_ty)?;
all_obligations.extend(obligations);
@ -549,7 +549,7 @@ fn check_supplied_sig_against_expectation(
);
all_obligations.push(
Obligation::new(
cause.clone(),
cause,
self.param_env,
ty::Predicate::TypeOutlives(
ty::Binder::dummy(

View File

@ -308,7 +308,7 @@ fn compare_predicate_entailment<'tcx>(
let cause = ObligationCause {
span: impl_err_span,
..cause.clone()
..cause
};
let mut diag = struct_span_err!(tcx.sess,