提交 c556ca98 编写于 作者: B bors

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
......@@ -96,7 +96,7 @@ fn _run_fmt(fmt: &::std::fmt::Arguments) -> ! {
macro_rules! assert(
($cond:expr) => (
if !$cond {
fail!("assertion failed: {:s}", stringify!($cond))
fail!(concat!("assertion failed: ", stringify!($cond)))
}
);
($cond:expr, $($arg:expr),+) => (
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册