don't clone types that are copy

found via clippy
This commit is contained in:
Matthias Krüger 2020-01-16 23:15:52 +01:00
parent 4884061838
commit 7fbd30b1ae
15 changed files with 18 additions and 20 deletions

View file

@ -175,7 +175,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
ty::Infer(ty::TyVar(vid)) => self.deduce_expectations_from_obligations(vid),
ty::FnPtr(sig) => {
let expected_sig = ExpectedSig { cause_span: None, sig: sig.skip_binder().clone() };
let expected_sig = ExpectedSig { cause_span: None, sig: *sig.skip_binder() };
(Some(expected_sig), Some(ty::ClosureKind::Fn))
}
_ => (None, None),