diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-28 18:39:09 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-03-29 16:39:08 -0700 |
| commit | 1e91595520d0538e6003dc9186f1b0df5c25b77a (patch) | |
| tree | 8199ebdfbabc8b0a537f7b9330716e3b9c71714a /src/libsyntax/ext | |
| parent | a17a9d41f6bf06daacb0aedb0cb2144dc4ba1c53 (diff) | |
| download | rust-1e91595520d0538e6003dc9186f1b0df5c25b77a.tar.gz rust-1e91595520d0538e6003dc9186f1b0df5c25b77a.zip | |
librustc: Remove `fail_unless!`
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 13 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 2 |
3 files changed, 2 insertions, 15 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 6f49fe02239..09498f09a29 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -449,19 +449,6 @@ pub fn core_macros() -> ~str { ) ) - macro_rules! fail_unless( - ($cond:expr) => { - if !$cond { - ::core::sys::fail_assert(stringify!($cond), file!(), line!()) - } - }; - ($cond:expr, $msg:expr) => { - if !$cond { - ::core::sys::fail_assert($msg, file!(), line!()) - } - } - ) - macro_rules! assert( ($cond:expr) => { if !$cond { diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index 99033b3b3cc..ca8a17dad67 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -54,7 +54,7 @@ impl gen_send for message { message(ref _id, span, ref tys, this, Some(ref next_state)) => { debug!("pipec: next state exists"); let next = this.proto.get_state(next_state.state); - fail_unless!(next_state.tys.len() == + assert!(next_state.tys.len() == next.generics.ty_params.len()); let arg_names = tys.mapi(|i, _ty| cx.ident_of(~"x_"+i.to_str())); let args_ast = vec::map2(arg_names, *tys, |n, t| cx.arg(*n, *t)); diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index e6619d6dcfa..f74fbbc3c03 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -407,7 +407,7 @@ pub fn parse( } } - fail_unless!(cur_eis.len() > 0u); + assert!(cur_eis.len() > 0u); } } |
