about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-07 14:46:59 +0200
committerGitHub <noreply@github.com>2020-04-07 14:46:59 +0200
commit89d661f15d8249f8e808b75b1129ce28e0889ba0 (patch)
treef993f7af10bd88484c767278196a488c6ee5bebf /src/liballoc/tests
parent78c64d062a86b865b41d4d07fead520e13bb9df5 (diff)
parentf7778d36c7246622c4c2330183f68cb9afd08c62 (diff)
downloadrust-89d661f15d8249f8e808b75b1129ce28e0889ba0.tar.gz
rust-89d661f15d8249f8e808b75b1129ce28e0889ba0.zip
Rollup merge of #70857 - faern:use-assoc-int-float-consts, r=dtolnay
Don't import integer and float modules, use assoc consts 2

Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :)

r? @dtolnay
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/arc.rs2
-rw-r--r--src/liballoc/tests/btree/map.rs2
-rw-r--r--src/liballoc/tests/rc.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/tests/arc.rs b/src/liballoc/tests/arc.rs
index 34384cfcba9..c02ba267056 100644
--- a/src/liballoc/tests/arc.rs
+++ b/src/liballoc/tests/arc.rs
@@ -50,7 +50,7 @@ fn trait_object() {
 
 #[test]
 fn float_nan_ne() {
-    let x = Arc::new(std::f32::NAN);
+    let x = Arc::new(f32::NAN);
     assert!(x != x);
     assert!(!(x == x));
 }
diff --git a/src/liballoc/tests/btree/map.rs b/src/liballoc/tests/btree/map.rs
index 14f12ca2d77..96b6c32a1fa 100644
--- a/src/liballoc/tests/btree/map.rs
+++ b/src/liballoc/tests/btree/map.rs
@@ -475,7 +475,7 @@ fn test_range_large() {
 
 #[test]
 fn test_range_inclusive_max_value() {
-    let max = std::usize::MAX;
+    let max = usize::MAX;
     let map: BTreeMap<_, _> = vec![(max, 0)].into_iter().collect();
 
     assert_eq!(map.range(max..=max).collect::<Vec<_>>(), &[(&max, &0)]);
diff --git a/src/liballoc/tests/rc.rs b/src/liballoc/tests/rc.rs
index 884856cd1b4..501b4f0f816 100644
--- a/src/liballoc/tests/rc.rs
+++ b/src/liballoc/tests/rc.rs
@@ -50,7 +50,7 @@ fn trait_object() {
 
 #[test]
 fn float_nan_ne() {
-    let x = Rc::new(std::f32::NAN);
+    let x = Rc::new(f32::NAN);
     assert!(x != x);
     assert!(!(x == x));
 }