]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/issue-53119.rs
New upstream version 1.66.0+dfsg1
[rustc.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() { }