diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-12-10 17:22:10 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-12-10 18:16:22 -0800 |
| commit | 3fcdb7d6a758ac4ed1f27fcda77c372edaab4c09 (patch) | |
| tree | de69a4a3cf7eef65c15ba3858df96220194e778e /src/libsyntax | |
| parent | ed686aeac4c717a85175a0f3b63d3ff50c2f50a7 (diff) | |
| download | rust-3fcdb7d6a758ac4ed1f27fcda77c372edaab4c09.tar.gz rust-3fcdb7d6a758ac4ed1f27fcda77c372edaab4c09.zip | |
Adjust the die macro to only accept ~str and to work in statement position
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 1890ec36bdd..e9d871752aa 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -378,21 +378,10 @@ fn core_macros() -> ~str { macro_rules! die( ($msg: expr) => ( - { - do core::str::as_buf($msg) |msg_buf, _msg_len| { - do core::str::as_buf(file!()) |file_buf, _file_len| { - unsafe { - let msg_buf = core::cast::transmute(msg_buf); - let file_buf = core::cast::transmute(file_buf); - let line = line!() as core::libc::size_t; - core::rt::rt_fail_(msg_buf, file_buf, line) - } - } - } - } + core::sys::begin_unwind($msg, file!(), line!()) ); () => ( - die!(\"explicit failure\") + die!(~\"explicit failure\") ) ) }"; |
