diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index a4cf29171d0..c99259fb29e 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -117,7 +117,6 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Output}; use std::str; use std::time::{self, Duration}; -use std::usize; use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc}; use serde_json::{self, Value}; diff --git a/crates/resolver-tests/tests/resolve.rs b/crates/resolver-tests/tests/resolve.rs index 2d2ac0fe32f..4ba0f9ba4e7 100644 --- a/crates/resolver-tests/tests/resolve.rs +++ b/crates/resolver-tests/tests/resolve.rs @@ -25,7 +25,7 @@ proptest! { 0 } else { // but that local builds will give a small clear test case. - std::u32::MAX + u32::MAX }, result_cache: prop::test_runner::basic_result_cache, .. ProptestConfig::default() diff --git a/src/cargo/core/resolver/conflict_cache.rs b/src/cargo/core/resolver/conflict_cache.rs index 863a517f7ad..c59e4117810 100644 --- a/src/cargo/core/resolver/conflict_cache.rs +++ b/src/cargo/core/resolver/conflict_cache.rs @@ -175,7 +175,7 @@ impl ConflictCache { dep: &Dependency, must_contain: Option, ) -> Option<&ConflictMap> { - let out = self.find(dep, &|id| cx.is_active(id), must_contain, std::usize::MAX); + let out = self.find(dep, &|id| cx.is_active(id), must_contain, usize::MAX); if cfg!(debug_assertions) { if let Some(c) = &out { assert!(cx.is_conflicting(None, c).is_some()); diff --git a/tests/testsuite/standard_lib.rs b/tests/testsuite/standard_lib.rs index 74205d9cfc9..8ebd35502ae 100644 --- a/tests/testsuite/standard_lib.rs +++ b/tests/testsuite/standard_lib.rs @@ -303,7 +303,7 @@ fn lib_nostd() { r#" #![no_std] pub fn foo() { - assert_eq!(core::u8::MIN, 0); + assert_eq!(u8::MIN, 0); } "#, ) diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index b0f1f5628f0..7f1561e3372 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -129,7 +129,7 @@ fn cargo_test_overflow_checks() { use std::panic; pub fn main() { let r = panic::catch_unwind(|| { - [1, i32::max_value()].iter().sum::(); + [1, i32::MAX].iter().sum::(); }); assert!(r.is_err()); }"#,