Skip to content

Commit

Permalink
Add currently broken minimal test case for bug causing stage 2 failure
Browse files Browse the repository at this point in the history
  • Loading branch information
cramertj committed Nov 10, 2017
1 parent db200c2 commit bd582de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/run-pass/impl-trait/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,12 @@ fn unnamed_lifetimes_arent_contained_in_impl_trait_and_will_unify<'a, 'b>

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

struct MyVec(Vec<Vec<u8>>);

impl<'unnecessary_lifetime> MyVec {
fn iter_doesnt_capture_unnecessary_lifetime<'s>(&'s self) -> impl Iterator<Item = &'s u8> {
self.0.iter().flat_map(|inner_vec| inner_vec.iter())
}
}

fn main() {}

0 comments on commit bd582de

Please sign in to comment.