std: Use concat! and stringify! to simplify the most common assert! case.

With no custom message, we should just use concat! + stringify! for
`assert!(expr)`.

Inspired by issue #16625
This commit is contained in:
root 2014-08-23 15:51:07 +02:00
parent 58bb603ea7
commit 262d5a4686
1 changed files with 1 additions and 1 deletions

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),+) => (