2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2015-03-22 20:13:15 +00:00
|
|
|
// pretty-expanded FIXME #23616
|
2023-06-02 03:05:16 +00:00
|
|
|
// revisions: current next
|
|
|
|
//[next] compile-flags: -Ztrait-solver=next
|
2015-03-22 20:13:15 +00:00
|
|
|
|
2014-10-02 19:52:06 +00:00
|
|
|
use std::slice;
|
|
|
|
|
2014-10-02 22:12:58 +00:00
|
|
|
pub struct PhfMapEntries<'a, T: 'a> {
|
2014-12-19 20:52:10 +00:00
|
|
|
iter: slice::Iter<'a, (&'static str, T)>,
|
2014-10-02 19:52:06 +00:00
|
|
|
}
|
|
|
|
|
2015-01-02 15:25:54 +00:00
|
|
|
impl<'a, T> Iterator for PhfMapEntries<'a, T> {
|
|
|
|
type Item = (&'static str, &'a T);
|
|
|
|
|
2014-10-02 19:52:06 +00:00
|
|
|
fn next(&mut self) -> Option<(&'static str, &'a T)> {
|
|
|
|
self.iter.by_ref().map(|&(key, ref value)| (key, value)).next()
|
|
|
|
}
|
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
fn size_hint(&self) -> (usize, Option<usize>) {
|
2014-10-02 19:52:06 +00:00
|
|
|
self.iter.size_hint()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|