auto merge of #16703 : bluss/rust/assert-bloat, r=huonw

With no custom message, we should just use concat! + stringify! for
`assert!(expr)` to avoid the string formatting code path.

Inspired by issue #16625
This commit is contained in:
bors 2014-08-24 06:00:58 +00:00
commit c556ca9853

View File

@ -96,7 +96,7 @@ macro_rules! fail(
macro_rules! assert(
($cond:expr) => (
if !$cond {
fail!("assertion failed: {:s}", stringify!($cond))
fail!(concat!("assertion failed: ", stringify!($cond)))
}
);
($cond:expr, $($arg:expr),+) => (