about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-28 13:26:30 -0800
committerbors <bors@rust-lang.org>2014-02-28 13:26:30 -0800
commit5b4a141b6adceeb82f5a2c97cdf55224fa56826e (patch)
treebc3e975c830c50d72ae5ac89c339a9ef43d70a2c /src/libstd/num
parent84ebf74ee2f163461cf021b3d415171e8b5ef8be (diff)
parentddc1c21264898f6a5d12cf03bba30f1f08b73665 (diff)
downloadrust-5b4a141b6adceeb82f5a2c97cdf55224fa56826e.tar.gz
rust-5b4a141b6adceeb82f5a2c97cdf55224fa56826e.zip
auto merge of #12616 : alexcrichton/rust/size, r=huonw
I've been playing around with code size when linking to libstd recently, and these were some findings I found that really helped code size. I started out by eliminating all I/O implementations from libnative and instead just return an unimplemented error.

In doing so, a `fn main() {}` executable was ~378K before this patch, and about 170K after the patch. These size wins are all pretty minor, but they all seemed pretty reasonable to me. With native I/O not stubbed out, this takes the size of an LTO executable from 675K to 400K.
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/strconv.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 153c042c6a8..00497b6f0ea 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -532,19 +532,19 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Div<T,T>+
         ) -> Option<T> {
     match exponent {
         ExpDec if radix >= DIGIT_E_RADIX       // decimal exponent 'e'
-          => fail!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {} incompatible with \
                     use of 'e' as decimal exponent", radix),
         ExpBin if radix >= DIGIT_P_RADIX       // binary exponent 'p'
-          => fail!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {} incompatible with \
                     use of 'p' as binary exponent", radix),
         _ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
-          => fail!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {} incompatible with \
                     special values 'inf' and 'NaN'", radix),
         _ if (radix as int) < 2
-          => fail!("from_str_bytes_common: radix {:?} to low, \
+          => fail!("from_str_bytes_common: radix {} to low, \
                     must lie in the range [2, 36]", radix),
         _ if (radix as int) > 36
-          => fail!("from_str_bytes_common: radix {:?} to high, \
+          => fail!("from_str_bytes_common: radix {} to high, \
                     must lie in the range [2, 36]", radix),
         _ => ()
     }