summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/auxiliary/issue-16643.rs
blob: 7808e0119f69faace723fd8933a75671c8a4f7c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![crate_type = "lib"]

pub struct TreeBuilder<H> { pub h: H }

impl<H> TreeBuilder<H> {
    pub fn process_token(&mut self) {
        match self {
            _ => for _y in self.by_ref() {}
        }
    }
}

impl<H> Iterator for TreeBuilder<H> {
    type Item = H;

    fn next(&mut self) -> Option<H> {
        None
    }
}