mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
27 lines
511 B
Rust
27 lines
511 B
Rust
//@ check-pass
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[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() { }
|