]> git.lizzy.rs Git - rust.git/commitdiff
dropck: remove unnecessary call to cloned()
authorljedrz <ljedrz@gmail.com>
Wed, 19 Dec 2018 15:41:15 +0000 (16:41 +0100)
committerljedrz <ljedrz@gmail.com>
Wed, 19 Dec 2018 15:41:15 +0000 (16:41 +0100)
src/librustc/traits/query/dropck_outlives.rs

index b993dd6080bb6c92fec4966805a1d38a9e5667a0..f506c47371c928abe46059645ed6f5c5316ed861 100644 (file)
@@ -227,7 +227,7 @@ pub fn trivial_dropck_outlives<'tcx>(tcx: TyCtxt<'_, '_, 'tcx>, ty: Ty<'tcx>) ->
 
         // (T1..Tn) and closures have same properties as T1..Tn --
         // check if *any* of those are trivial.
-        ty::Tuple(ref tys) => tys.iter().cloned().all(|t| trivial_dropck_outlives(tcx, t)),
+        ty::Tuple(ref tys) => tys.iter().all(|t| trivial_dropck_outlives(tcx, t)),
         ty::Closure(def_id, ref substs) => substs
             .upvar_tys(def_id, tcx)
             .all(|t| trivial_dropck_outlives(tcx, t)),