]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/iterators/iter-position-overflow-debug.rs
Update tests to remove old numeric constants
[rust.git] / src / test / ui / iterators / iter-position-overflow-debug.rs
index f1eded31702c4449d4ebf383127d13b251d84b81..733ee0c46cc3d6c5d1621f3a7c918c37be708de1 100644 (file)
@@ -4,11 +4,10 @@
 // compile-flags: -C debug_assertions=yes -C opt-level=3
 
 use std::panic;
-use std::usize::MAX;
 
 fn main() {
-    let n = MAX as u64;
-    assert_eq!((0..).by_ref().position(|i| i >= n), Some(MAX));
+    let n = usize::MAX as u64;
+    assert_eq!((0..).by_ref().position(|i| i >= n), Some(usize::MAX));
 
     let r = panic::catch_unwind(|| {
         (0..).by_ref().position(|i| i > n)