]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-53119.rs
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / issue-53119.rs
1 // check-pass
2
3 use std::ops::Deref;
4
5 pub struct TypeFieldIterator<'a, T: 'a> {
6     _t: &'a T,
7 }
8
9 pub struct Type<Id, T> {
10     _types: Vec<(Id, T)>,
11 }
12
13 impl<'a, Id: 'a, T> Iterator for TypeFieldIterator<'a, T>
14 where T: Deref<Target = Type<Id, T>> {
15     type Item = &'a (Id, T);
16
17     fn next(&mut self) -> Option<&'a (Id, T)> {
18         || self.next();
19         None
20     }
21 }
22
23 fn main() { }