rust/tests/ui/issues/issue-37884.rs
2023-01-11 09:32:08 +00:00

15 lines
290 B
Rust

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() {}