From e1be9ae22468e19d66daaebbceeeeaea2e75f903 Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Tue, 23 Apr 2013 22:30:58 +0200 Subject: 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. --- src/libsyntax/ext/auto_encode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/ext/auto_encode.rs') 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 { -- cgit 1.4.1-3-g733a5