Skip to content

Commit f7c4a50

Browse files
committed
fix clone call
1 parent 22318f1 commit f7c4a50

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_trait_selection/src/traits/error_reporting

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
491491
let code = if let ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } =
492492
&obligation.cause.code
493493
{
494-
std::rc::Rc::clone(parent_code)
494+
parent_code.clone()
495495
} else {
496496
return;
497497
};
@@ -687,7 +687,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
687687
if let (ObligationCauseCode::FunctionArgumentObligation { parent_code, .. }, false) =
688688
(&obligation.cause.code, points_at_for_iter)
689689
{
690-
std::rc::Rc::clone(parent_code)
690+
parent_code.clone()
691691
} else {
692692
return false;
693693
};

0 commit comments

Comments
 (0)