]>
Commit | Line | Data |
---|---|---|
e1599b0c | 1 | // check-pass |
1b1a35ee XL |
2 | // revisions: full min |
3 | #![cfg_attr(full, feature(const_generics))] | |
4 | #![cfg_attr(full, allow(incomplete_features))] | |
5 | #![cfg_attr(min, feature(min_const_generics))] | |
e1599b0c XL |
6 | |
7 | struct Foo<const D: usize> { | |
8 | state: Option<[u8; D]>, | |
9 | } | |
10 | ||
11 | impl<const D: usize> Iterator for Foo<{D}> { | |
12 | type Item = [u8; D]; | |
13 | fn next(&mut self) -> Option<Self::Item> { | |
14 | if true { | |
15 | return Some(self.state.unwrap().clone()); | |
16 | } else { | |
17 | return Some(self.state.unwrap().clone()); | |
18 | } | |
19 | } | |
20 | } | |
21 | ||
22 | fn main() {} |