]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/iterators/iter-position-overflow-ndebug.rs
Update tests to remove old numeric constants
[rust.git] / src / test / ui / iterators / iter-position-overflow-ndebug.rs
index 3b0c245a5c2a18369ff8ad0d2833a88d405f9880..e610c35599c4cb61ac1fb9a322cf3820d45d19f5 100644 (file)
@@ -2,11 +2,9 @@
 // only-32bit too impatient for 2⁶⁴ items
 // compile-flags: -C debug_assertions=no -C opt-level=3
 
-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));
     assert_eq!((0..).by_ref().position(|i| i > n), Some(0));
     assert_eq!((0..=n + 1).by_ref().position(|_| false), None);
 }