about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-17 09:37:50 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-26 10:28:04 +0000
commit9baeb453095bc74966e0c99a6eeddefed5ed9eaa (patch)
treef235429e5c20499022cbb635074fd38b705ca359 /library/std
parent29166cd61711776e6d43239d6d18a0eafe6515b1 (diff)
downloadrust-9baeb453095bc74966e0c99a6eeddefed5ed9eaa.tar.gz
rust-9baeb453095bc74966e0c99a6eeddefed5ed9eaa.zip
Move std::num unit tests to integration tests
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/num.rs3
-rw-r--r--library/std/tests/num.rs (renamed from library/std/src/num/tests.rs)6
2 files changed, 3 insertions, 6 deletions
diff --git a/library/std/src/num.rs b/library/std/src/num.rs
index dd76081532f..ffb8789c906 100644
--- a/library/std/src/num.rs
+++ b/library/std/src/num.rs
@@ -6,9 +6,6 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 #![allow(missing_docs)]
 
-#[cfg(test)]
-mod tests;
-
 #[stable(feature = "int_error_matching", since = "1.55.0")]
 pub use core::num::IntErrorKind;
 #[stable(feature = "generic_nonzero", since = "1.79.0")]
diff --git a/library/std/src/num/tests.rs b/library/std/tests/num.rs
index df0df3f23f7..a7400f1c02d 100644
--- a/library/std/src/num/tests.rs
+++ b/library/std/tests/num.rs
@@ -1,4 +1,4 @@
-use crate::ops::Mul;
+use std::ops::Mul;
 
 #[test]
 fn test_saturating_add_uint() {
@@ -190,8 +190,8 @@ fn test_uint_to_str_overflow() {
     assert_eq!(u64_val.to_string(), "0");
 }
 
-fn from_str<T: crate::str::FromStr>(t: &str) -> Option<T> {
-    crate::str::FromStr::from_str(t).ok()
+fn from_str<T: std::str::FromStr>(t: &str) -> Option<T> {
+    std::str::FromStr::from_str(t).ok()
 }
 
 #[test]