From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../nested-rpit-with-anonymous-lifetimes.rs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs (limited to 'tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs') diff --git a/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs new file mode 100644 index 000000000..287a030cf --- /dev/null +++ b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs @@ -0,0 +1,23 @@ +// check-pass + +pub struct VecNumber<'s> { + pub vec_number: Vec>, + pub auxiliary_object: &'s Vec, +} + +pub struct Number<'s> { + pub number: &'s usize, +} + +impl<'s> VecNumber<'s> { + pub fn vec_number_iterable_per_item_in_auxiliary_object( + &self, + ) -> impl Iterator>)> { + self.auxiliary_object.iter().map(move |n| { + let iter_number = self.vec_number.iter(); + (n, iter_number) + }) + } +} + +fn main() {} -- cgit v1.2.3