2016-12-22 11:46:08 -06:00
|
|
|
struct RepeatMut<'a, T>(T, &'a ());
|
|
|
|
|
|
|
|
impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
|
2017-05-11 07:05:00 -05:00
|
|
|
|
2016-12-22 11:46:08 -06:00
|
|
|
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() {}
|