diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2013-07-31 10:15:52 +0200 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2013-07-31 10:15:52 +0200 |
| commit | c725926cf5964c4510e2c9ee656c24c48451e88c (patch) | |
| tree | 3cff2acafcc2a47f8133cebb17971f03857bd2a7 | |
| parent | 38d62feec1e65ba5ed57235355053782ca15b5ff (diff) | |
| download | rust-c725926cf5964c4510e2c9ee656c24c48451e88c.tar.gz rust-c725926cf5964c4510e2c9ee656c24c48451e88c.zip | |
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.
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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) => { |
