Skip to content

Commit bd582de

Browse files
committed
Add currently broken minimal test case for bug causing stage 2 failure
1 parent db200c2 commit bd582de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/run-pass/impl-trait/lifetimes.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,12 @@ fn unnamed_lifetimes_arent_contained_in_impl_trait_and_will_unify<'a, 'b>
7878

7979
fn can_add_region_bound_to_static_type<'a, 'b>(_: &'a u32) -> impl Debug + 'a { 5 }
8080

81+
struct MyVec(Vec<Vec<u8>>);
82+
83+
impl<'unnecessary_lifetime> MyVec {
84+
fn iter_doesnt_capture_unnecessary_lifetime<'s>(&'s self) -> impl Iterator<Item = &'s u8> {
85+
self.0.iter().flat_map(|inner_vec| inner_vec.iter())
86+
}
87+
}
88+
8189
fn main() {}

0 commit comments

Comments
 (0)