about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-09-07 13:23:39 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-09-16 12:12:28 +0000
commitf7c4a50f8a5c3fc8de5363893ac984cc523628ab (patch)
tree98740e774917913a3e8a0955ad859e0228ca4e02
parent22318f1a31d8ef4d46036b552fd848314d603978 (diff)
downloadrust-f7c4a50f8a5c3fc8de5363893ac984cc523628ab.tar.gz
rust-f7c4a50f8a5c3fc8de5363893ac984cc523628ab.zip
fix `clone` call
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs4
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;
             };