about summary refs log tree commit diff
path: root/src/test/ui/iterators/iter-position-overflow-debug.rs
diff options
context:
space:
mode:
authorbstrie <bstrie@thinwsl>2020-10-24 19:21:40 -0400
committerbstrie <bstrie@thinwsl>2020-11-29 00:55:55 -0500
commit90a2e5e3fe59a254d4d707aa291517b3791ea5a6 (patch)
treed69ece1bc91aeb70d7bbf1d1180107eb90d5225f /src/test/ui/iterators/iter-position-overflow-debug.rs
parent914d07ae5f90f01f138e66807873295fceaa9a26 (diff)
downloadrust-90a2e5e3fe59a254d4d707aa291517b3791ea5a6.tar.gz
rust-90a2e5e3fe59a254d4d707aa291517b3791ea5a6.zip
Update tests to remove old numeric constants
Part of #68490.

Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros.

For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
Diffstat (limited to 'src/test/ui/iterators/iter-position-overflow-debug.rs')
-rw-r--r--src/test/ui/iterators/iter-position-overflow-debug.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/ui/iterators/iter-position-overflow-debug.rs b/src/test/ui/iterators/iter-position-overflow-debug.rs
index f1eded31702..733ee0c46cc 100644
--- a/src/test/ui/iterators/iter-position-overflow-debug.rs
+++ b/src/test/ui/iterators/iter-position-overflow-debug.rs
@@ -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)