1
Fork 0
rust/src/test/ui/iterators/iter-count-overflow-debug.rs
Thomas Lively 2bf59bea48 Upgrade Emscripten targets to use upstream LLVM backend
- Compatible with Emscripten 1.38.46-upstream or later upstream.
 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the old incorrect wasm32 C call ABI with the correct one,
   preserving the old one as wasm32_bindgen_compat for wasm-bindgen
   compatibility.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16 17:06:48 -07:00

16 lines
380 B
Rust

// run-pass
// only-32bit too impatient for 2⁶⁴ items
// ignore-emscripten compiled with panic=abort by default
// compile-flags: -C debug_assertions=yes -C opt-level=3
use std::panic;
use std::usize::MAX;
fn main() {
assert_eq!((0..MAX).by_ref().count(), MAX);
let r = panic::catch_unwind(|| {
(0..=MAX).by_ref().count()
});
assert!(r.is_err());
}