rust/tests/ui/nll/issue-53119.rs
2023-12-14 15:22:37 +01:00

26 lines
451 B
Rust

// check-pass
// revisions: current next
//[next] compile-flags: -Znext-solver
use std::ops::Deref;
pub struct TypeFieldIterator<'a, T: 'a> {
_t: &'a T,
}
pub struct Type<Id, T> {
_types: Vec<(Id, T)>,
}
impl<'a, Id: 'a, T> Iterator for TypeFieldIterator<'a, T>
where T: Deref<Target = Type<Id, T>> {
type Item = &'a (Id, T);
fn next(&mut self) -> Option<&'a (Id, T)> {
|| self.next();
None
}
}
fn main() { }