diff --git a/src/librustc_builtin_macros/deriving/generic/mod.rs b/src/librustc_builtin_macros/deriving/generic/mod.rs index 00ed05608b50..7f7ee6e0fed7 100644 --- a/src/librustc_builtin_macros/deriving/generic/mod.rs +++ b/src/librustc_builtin_macros/deriving/generic/mod.rs @@ -588,14 +588,14 @@ impl<'a> TraitDef<'a> { span: self.span, bound_generic_params: wb.bound_generic_params.clone(), bounded_ty: wb.bounded_ty.clone(), - bounds: wb.bounds.iter().cloned().collect(), + bounds: wb.bounds.to_vec(), }) } ast::WherePredicate::RegionPredicate(ref rb) => { ast::WherePredicate::RegionPredicate(ast::WhereRegionPredicate { span: self.span, lifetime: rb.lifetime, - bounds: rb.bounds.iter().cloned().collect(), + bounds: rb.bounds.to_vec(), }) } ast::WherePredicate::EqPredicate(ref we) => {