summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-37884.rs
blob: ee37481b23f72ec167eb690c6a69d6437389dcf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct RepeatMut<'a, T>(T, &'a ());

impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {

    type Item = &'a mut T;
    fn next(&'a mut self) -> Option<Self::Item>
    //~^ ERROR method not compatible with trait
    //~| lifetime mismatch
    {
        Some(&mut self.0)
    }
}

fn main() {}