diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-09-07 13:23:39 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-09-16 12:12:28 +0000 |
| commit | f7c4a50f8a5c3fc8de5363893ac984cc523628ab (patch) | |
| tree | 98740e774917913a3e8a0955ad859e0228ca4e02 | |
| parent | 22318f1a31d8ef4d46036b552fd848314d603978 (diff) | |
| download | rust-f7c4a50f8a5c3fc8de5363893ac984cc523628ab.tar.gz rust-f7c4a50f8a5c3fc8de5363893ac984cc523628ab.zip | |
fix `clone` call
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 92cf4fb414a..7db1d5f4e8a 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -491,7 +491,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { let code = if let ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } = &obligation.cause.code { - std::rc::Rc::clone(parent_code) + parent_code.clone() } else { return; }; @@ -687,7 +687,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { if let (ObligationCauseCode::FunctionArgumentObligation { parent_code, .. }, false) = (&obligation.cause.code, points_at_for_iter) { - std::rc::Rc::clone(parent_code) + parent_code.clone() } else { return false; }; |
