summaryrefslogtreecommitdiffstats
path: root/src/test/ui/iterators/iter-count-overflow-ndebug.rs
blob: dcaaff671b257a27e840a7fcabe0063a299f9375 (plain)
1
2
3
4
5
6
7
8
// run-pass
// only-32bit too impatient for 2⁶⁴ items
// compile-flags: -C debug_assertions=no -C opt-level=3

fn main() {
    assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX);
    assert_eq!((0..=usize::MAX).by_ref().count(), 0);
}