about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorroot <root@localhost>2014-08-23 15:51:07 +0200
committerroot <root@localhost>2014-08-23 16:30:44 +0200
commit262d5a4686c80675fe5bfcb79b26b341b9a0bf7a (patch)
tree21ec370d240da1a434900c39716696233a5ea435 /src/libstd
parent58bb603ea74a388d7a4dafc0c78f214a46301505 (diff)
downloadrust-262d5a4686c80675fe5bfcb79b26b341b9a0bf7a.tar.gz
rust-262d5a4686c80675fe5bfcb79b26b341b9a0bf7a.zip
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
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 85e614ab47e..0ebca006c4c 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -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),+) => (