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:
commit
c556ca9853
@ -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),+) => (
|
||||
|
Loading…
Reference in New Issue
Block a user