]> git.proxmox.com Git - rustc.git/blob - tests/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / rustdoc / synthetic_auto / issue-72213-projection-lifetime.rs
1 // Regression test for issue #72213
2 // Tests that we don't ICE when we have projection predicates
3 // in our initial ParamEnv
4
5 pub struct Lines<'a, L>
6 where
7 L: Iterator<Item = &'a ()>,
8 {
9 words: std::iter::Peekable<Words<'a, L>>,
10 }
11
12 pub struct Words<'a, L> {
13 _m: std::marker::PhantomData<&'a L>,
14 }
15
16 impl<'a, L> Iterator for Words<'a, L>
17 where
18 L: Iterator<Item = &'a ()>,
19 {
20 type Item = ();
21
22 fn next(&mut self) -> Option<Self::Item> {
23 unimplemented!()
24 }
25 }