mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
290 B
Rust
14 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() {}
|