]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-13167.rs
Rollup merge of #54728 - alexcrichton:renumber-issues, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-13167.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // compile-pass
12 // pretty-expanded FIXME #23616
13
14 use std::slice;
15
16 pub struct PhfMapEntries<'a, T: 'a> {
17     iter: slice::Iter<'a, (&'static str, T)>,
18 }
19
20 impl<'a, T> Iterator for PhfMapEntries<'a, T> {
21     type Item = (&'static str, &'a T);
22
23     fn next(&mut self) -> Option<(&'static str, &'a T)> {
24         self.iter.by_ref().map(|&(key, ref value)| (key, value)).next()
25     }
26
27     fn size_hint(&self) -> (usize, Option<usize>) {
28         self.iter.size_hint()
29     }
30 }
31
32 fn main() {}