From c725926cf5964c4510e2c9ee656c24c48451e88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Wed, 31 Jul 2013 10:15:52 +0200 Subject: [PATCH] Reduce code bloat from assert!() Assertions without a message get a generated message that consists of a prefix plus the stringified expression that is being asserted. That prefix is currently a unique string, while a static string would be sufficient and needs less code. --- src/libsyntax/ext/expand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index af05f726860..f3a55da88cb 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -529,7 +529,7 @@ pub fn std_macros() -> @str { ($cond:expr) => { if !$cond { ::std::sys::FailWithCause::fail_with( - ~\"assertion failed: \" + stringify!($cond), file!(), line!()) + \"assertion failed: \" + stringify!($cond), file!(), line!()) } }; ($cond:expr, $msg:expr) => {