about summary refs log tree commit diff
path: root/src/libstd/num/uint_macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/num/uint_macros.rs')
-rw-r--r--src/libstd/num/uint_macros.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index 7f2efe034a2..cfcaf0fa8da 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -56,7 +56,7 @@ impl FromStrRadix for $T {
 
 /// Convert to a string as a byte slice in a given base.
 ///
-/// Use in place of x.to_str() when you do not need to store the string permanently
+/// Use in place of x.to_string() when you do not need to store the string permanently
 ///
 /// # Examples
 ///
@@ -101,7 +101,7 @@ mod tests {
     use u16;
 
     #[test]
-    pub fn test_to_str() {
+    pub fn test_to_string() {
         assert_eq!((0 as $T).to_str_radix(10u), "0".to_string());
         assert_eq!((1 as $T).to_str_radix(10u), "1".to_string());
         assert_eq!((2 as $T).to_str_radix(10u), "2".to_string());
@@ -141,28 +141,28 @@ mod tests {
     #[test]
     fn test_uint_to_str_overflow() {
         let mut u8_val: u8 = 255_u8;
-        assert_eq!(u8_val.to_str(), "255".to_string());
+        assert_eq!(u8_val.to_string(), "255".to_string());
 
         u8_val += 1 as u8;
-        assert_eq!(u8_val.to_str(), "0".to_string());
+        assert_eq!(u8_val.to_string(), "0".to_string());
 
         let mut u16_val: u16 = 65_535_u16;
-        assert_eq!(u16_val.to_str(), "65535".to_string());
+        assert_eq!(u16_val.to_string(), "65535".to_string());
 
         u16_val += 1 as u16;
-        assert_eq!(u16_val.to_str(), "0".to_string());
+        assert_eq!(u16_val.to_string(), "0".to_string());
 
         let mut u32_val: u32 = 4_294_967_295_u32;
-        assert_eq!(u32_val.to_str(), "4294967295".to_string());
+        assert_eq!(u32_val.to_string(), "4294967295".to_string());
 
         u32_val += 1 as u32;
-        assert_eq!(u32_val.to_str(), "0".to_string());
+        assert_eq!(u32_val.to_string(), "0".to_string());
 
         let mut u64_val: u64 = 18_446_744_073_709_551_615_u64;
-        assert_eq!(u64_val.to_str(), "18446744073709551615".to_string());
+        assert_eq!(u64_val.to_string(), "18446744073709551615".to_string());
 
         u64_val += 1 as u64;
-        assert_eq!(u64_val.to_str(), "0".to_string());
+        assert_eq!(u64_val.to_string(), "0".to_string());
     }
 
     #[test]