Skip to content

Commit 6ee2155

Browse files
committed
remove no-stmt check
nothing wrong with a statement expanding into 0 stmts, that I can see.
1 parent c4cc3ba commit 6ee2155

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/libsyntax/ext/expand.rs

-4
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,6 @@ fn expand_stmt(s: &Stmt, fld: &mut MacroExpander) -> SmallVector<Gc<Stmt>> {
612612

613613
// Keep going, outside-in.
614614
let fully_expanded = fld.fold_stmt(&*marked_after);
615-
if fully_expanded.is_empty() {
616-
fld.cx.span_err(pth.span, "macro didn't expand to a statement");
617-
return SmallVector::zero();
618-
}
619615
fld.cx.bt_pop();
620616
let fully_expanded: SmallVector<Gc<Stmt>> = fully_expanded.move_iter()
621617
.map(|s| box(GC) Spanned { span: s.span, node: s.node.clone() })

0 commit comments

Comments
 (0)