2 // only-32bit too impatient for 2⁶⁴ items
3 // ignore-wasm32-bare compiled with panic=abort by default
4 // compile-flags: -C debug_assertions=yes -C opt-level=3
9 let n = usize::MAX as u64;
10 assert_eq!((0..).by_ref().position(|i| i >= n), Some(usize::MAX));
12 let r = panic::catch_unwind(|| {
13 (0..).by_ref().position(|i| i > n)
17 let r = panic::catch_unwind(|| {
18 (0..=n + 1).by_ref().position(|_| false)