diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-04-23 22:30:58 +0200 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-04-25 17:32:25 +0200 |
| commit | e1be9ae22468e19d66daaebbceeeeaea2e75f903 (patch) | |
| tree | dc442111f15ccd656e6ea9598307f57a3bd78b73 /src/libsyntax/ext/auto_encode.rs | |
| parent | 1d53babd2f23439975518fda94d9122b15e779c9 (diff) | |
| download | rust-e1be9ae22468e19d66daaebbceeeeaea2e75f903.tar.gz rust-e1be9ae22468e19d66daaebbceeeeaea2e75f903.zip | |
Made fail! and assert! accept both &'static str and ~str, as well as a fmt! like format list.
Unwinding through macros now happens as a call to the trait function `FailWithCause::fail_with()`, which consumes self, allowing to use a more generic failure object in the future.
Diffstat (limited to 'src/libsyntax/ext/auto_encode.rs')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 67c09c00733..8263fce2356 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -1101,7 +1101,7 @@ fn mk_enum_deser_body( }; let quoted_expr = copy quote_expr!( - ::core::sys::begin_unwind(~"explicit failure", ~"empty", 1); + ::core::sys::FailWithCause::fail_with("explicit failure", "empty", 1); ).node; let impossible_case = ast::arm { |
