2019-11-04 00:00:00 +00:00
|
|
|
//@ check-pass
|
2023-06-02 03:05:16 +00:00
|
|
|
//@ revisions: current next
|
2024-03-11 01:18:41 +00:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-14 12:11:28 +00:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2018-08-08 07:02:47 +00:00
|
|
|
|
|
|
|
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() { }
|