diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-07-02 09:01:21 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-07-12 04:31:13 +0000 |
| commit | 6189e6cdba6d12ab65baafd95c5f8a6e0cc37937 (patch) | |
| tree | 68ce7a7ccc4d4ca3cc70c10f935a5ecb0055951b /src/libsyntax/ext | |
| parent | 3265bd54b5b3f32d038273afec7554f007a5ce1d (diff) | |
| download | rust-6189e6cdba6d12ab65baafd95c5f8a6e0cc37937.tar.gz rust-6189e6cdba6d12ab65baafd95c5f8a6e0cc37937.zip | |
Clean up statement parsing without changing the semantics of `parse_stmt`.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index b2b63d0dbb4..220e0a753c3 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -444,14 +444,7 @@ fn expand_stmt(stmt: Stmt, fld: &mut MacroExpander) -> SmallVector<Stmt> { // semicolon to the final statement produced by expansion. if style == MacStmtStyle::Semicolon { if let Some(stmt) = fully_expanded.pop() { - fully_expanded.push(Stmt { - id: stmt.id, - node: match stmt.node { - StmtKind::Expr(expr) => StmtKind::Semi(expr), - _ => stmt.node /* might already have a semi */ - }, - span: stmt.span, - }); + fully_expanded.push(stmt.add_trailing_semicolon()); } } |
