Skip to content

Commit

Permalink
Don't stop expansion after hitting a nested macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy committed Jan 1, 2016
1 parent ece4175 commit d492f22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ struct WrappingFolder<'cx> {

impl<'cx> Folder for WrappingFolder<'cx> {
fn fold_mac(&mut self, mac: Mac) -> Mac {
self.cx.span_fatal(mac.span, "cannot call nested macros in a `wrapping!` block");
self.cx.span_err(mac.span, "cannot call nested macros in a `wrapping!` block");
mac
}

fn fold_expr(&mut self, expr: P<Expr>) -> P<Expr> {
Expand Down

0 comments on commit d492f22

Please sign in to comment.