summaryrefslogtreecommitdiffstats
path: root/tests/ui/iterators/skip-count-overflow.rs
blob: 64dee3e3c8b2029770789648d4c81966c8fe6f26 (plain)
1
2
3
4
5
6
7
8
// run-pass
// only-32bit too impatient for 2⁶⁴ items
// compile-flags: -C overflow-checks -C opt-level=3

fn main() {
    let i = (0..usize::MAX).chain(0..10).skip(usize::MAX);
    assert_eq!(i.count(), 10);
}