about summary refs log tree commit diff
path: root/tests/ui/issues/issue-37884.rs
blob: 3480942d9d282ded1dbc77daae4b6735780b51be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ dont-require-annotations: NOTE

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
    //~| NOTE lifetime mismatch
    {
        Some(&mut self.0)
    }
}

fn main() {}