about summary refs log tree commit diff
path: root/src/test/ui/iterators/skip-count-overflow.rs
blob: d8efc948664ff00491a46d2ad1988d71f722f183 (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_value()).chain(0..10).skip(usize::max_value());
    assert_eq!(i.count(), 10);
}