From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/issues/issue-41880.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/test/ui/issues/issue-41880.rs (limited to 'src/test/ui/issues/issue-41880.rs') diff --git a/src/test/ui/issues/issue-41880.rs b/src/test/ui/issues/issue-41880.rs deleted file mode 100644 index 977c43b71..000000000 --- a/src/test/ui/issues/issue-41880.rs +++ /dev/null @@ -1,29 +0,0 @@ -fn iterate(initial: T, f: F) -> Iterate { - Iterate { - state: initial, - f: f, - } -} - -pub struct Iterate { - state: T, - f: F -} - -impl Iterator for Iterate where F: Fn(&T) -> T { - type Item = T; - - #[inline] - fn next(&mut self) -> Option { - self.state = (self.f)(&self.state); - Some(self.state.clone()) - } - #[inline] - fn size_hint(&self) -> (usize, Option) { (usize::MAX, None) } -} - -fn main() { - let a = iterate(0, |x| x+1); - println!("{:?}", a.iter().take(10).collect::>()); - //~^ ERROR no method named `iter` found -} -- cgit v1.2.3