From 17a0740ebb1798ee29fc39c1ec025f0949144541 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sat, 10 Dec 2022 09:03:14 +0100 Subject: [PATCH] libcore: make result of iter::from_generator Clone This is currently only relevant with #![feature(generator_clone)]. --- library/core/src/iter/sources/from_generator.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/iter/sources/from_generator.rs b/library/core/src/iter/sources/from_generator.rs index a974d3c892d00..4cbe731b222f9 100644 --- a/library/core/src/iter/sources/from_generator.rs +++ b/library/core/src/iter/sources/from_generator.rs @@ -35,6 +35,7 @@ pub fn from_generator + Unpin>(generator: G) -> FromGe /// /// [`iter::from_generator()`]: from_generator #[unstable(feature = "iter_from_generator", issue = "43122", reason = "generators are unstable")] +#[derive(Clone)] pub struct FromGenerator(G); #[unstable(feature = "iter_from_generator", issue = "43122", reason = "generators are unstable")]