about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-05 15:00:49 -0700
committerbors <bors@rust-lang.org>2013-09-05 15:00:49 -0700
commit6f9ce0948a47dbbb5a0ed9aae12e2cce6755465a (patch)
tree64a0cb6ba9e7796da1ffad8044dda1bb6d33adf2 /src/libstd/num
parentd1dde99e4b3d43d044cdead7240bbd5f0d7a0ce5 (diff)
parentde39874801761197bf10bf8d04bde1aa2bd82e15 (diff)
downloadrust-6f9ce0948a47dbbb5a0ed9aae12e2cce6755465a.tar.gz
rust-6f9ce0948a47dbbb5a0ed9aae12e2cce6755465a.zip
auto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brson
Patch for #8985
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/int_macros.rs2
-rw-r--r--src/libstd/num/strconv.rs2
-rw-r--r--src/libstd/num/uint_macros.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs
index 0131feda830..377d0a78134 100644
--- a/src/libstd/num/int_macros.rs
+++ b/src/libstd/num/int_macros.rs
@@ -541,7 +541,7 @@ impl ToStrRadix for $T {
         }
         // We know we generated valid utf-8, so we don't need to go through that
         // check.
-        unsafe { str::raw::from_bytes_owned(buf) }
+        unsafe { str::raw::from_utf8_owned(buf) }
     }
 }
 
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 6fba8a6dd13..edfabd339af 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -417,7 +417,7 @@ pub fn float_to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Float+Round+
         sign: SignFormat, digits: SignificantDigits) -> (~str, bool) {
     let (bytes, special) = float_to_str_bytes_common(num, radix,
                                negative_zero, sign, digits);
-    (str::from_bytes(bytes), special)
+    (str::from_utf8(bytes), special)
 }
 
 // Some constants for from_str_bytes_common's input validation,
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index 1426142d465..af991045b45 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -396,7 +396,7 @@ impl ToStrRadix for $T {
         }
         // We know we generated valid utf-8, so we don't need to go through that
         // check.
-        unsafe { str::raw::from_bytes_owned(buf) }
+        unsafe { str::raw::from_utf8_owned(buf) }
     }
 }