Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errors

don't clone Copy types
This commit is contained in:
Matthias Krüger
2022-12-18 23:03:07 +01:00
committed by GitHub
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(..)