don't clone Copy types

This commit is contained in:
Matthias Krüger 2022-12-18 14:25:55 +01:00
parent 35a99eef32
commit fec9e9ecf1
11 changed files with 16 additions and 16 deletions

View file

@ -1574,7 +1574,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
&error.obligation.cause,
expected_found.expected,
expected_found.found,
err.clone(),
*err,
)
.emit();
}
@ -1583,7 +1583,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
&error.obligation.cause,
expected_found.expected,
expected_found.found,
err.clone(),
*err,
);
let code = error.obligation.cause.code().peel_derives().peel_match_impls();
if let ObligationCauseCode::BindingObligation(..)