blob: 1b41a8204af578b2324622fdfcfd959925d42d0b [file] [log] [blame]
//@ check-pass
struct Foo<const D: usize> {
state: Option<[u8; D]>,
}
impl<const D: usize> Iterator for Foo<{D}> {
type Item = [u8; D];
fn next(&mut self) -> Option<Self::Item> {
if true {
return Some(self.state.unwrap().clone());
} else {
return Some(self.state.unwrap().clone());
}
}
}
fn main() {}