about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorOliver 'ker' Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-09 11:56:59 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commite797e1961df00ec7725c47225dcf9b5a0e9fce64 (patch)
tree1742d6186f4c02a8f043d9d213d00d67b73a37d0 /src/libsyntax/parse/parser.rs
parent798974cae58639c174010fd4a6411dcdc860e404 (diff)
downloadrust-e797e1961df00ec7725c47225dcf9b5a0e9fce64.tar.gz
rust-e797e1961df00ec7725c47225dcf9b5a0e9fce64.zip
[breaking-change] don't glob export ast::MacStmtStyle
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5121f6e1561..0875d054564 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -26,7 +26,7 @@ use ast::{ForeignItem, ForeignItemKind, FunctionRetTy};
 use ast::{Ident, Inherited, ImplItem, Item, ItemKind};
 use ast::{Lit, LitKind, UintTy};
 use ast::Local;
-use ast::{MacStmtWithBraces, MacStmtWithSemicolon, MacStmtWithoutBraces};
+use ast::MacStmtStyle;
 use ast::{MutImmutable, MutMutable, Mac_};
 use ast::{MutTy, Mutability};
 use ast::NamedField;
@@ -3721,9 +3721,9 @@ impl<'a> Parser<'a> {
             let hi = self.last_span.hi;
 
             let style = if delim == token::Brace {
-                MacStmtWithBraces
+                MacStmtStyle::Braces
             } else {
-                MacStmtWithoutBraces
+                MacStmtStyle::NoBraces
             };
 
             if id.name == token::special_idents::invalid.name {
@@ -3734,7 +3734,7 @@ impl<'a> Parser<'a> {
                 // if it has a special ident, it's definitely an item
                 //
                 // Require a semicolon or braces.
-                if style != MacStmtWithBraces {
+                if style != MacStmtStyle::Braces {
                     if !self.eat(&token::Semi) {
                         let last_span = self.last_span;
                         self.span_err(last_span,
@@ -3841,13 +3841,13 @@ impl<'a> Parser<'a> {
                 StmtKind::Expr(e, _) => {
                     try!(self.handle_expression_like_statement(e, span, &mut stmts, &mut expr));
                 }
-                StmtKind::Mac(mac, MacStmtWithoutBraces, attrs) => {
+                StmtKind::Mac(mac, MacStmtStyle::NoBraces, attrs) => {
                     // statement macro without braces; might be an
                     // expr depending on whether a semicolon follows
                     match self.token {
                         token::Semi => {
                             stmts.push(P(Spanned {
-                                node: StmtKind::Mac(mac, MacStmtWithSemicolon, attrs),
+                                node: StmtKind::Mac(mac, MacStmtStyle::Semicolon, attrs),
                                 span: mk_sp(span.lo, self.span.hi),
                             }));
                             self.bump();
@@ -3872,7 +3872,7 @@ impl<'a> Parser<'a> {
                     match self.token {
                         token::Semi => {
                             stmts.push(P(Spanned {
-                                node: StmtKind::Mac(m, MacStmtWithSemicolon, attrs),
+                                node: StmtKind::Mac(m, MacStmtStyle::Semicolon, attrs),
                                 span: mk_sp(span.lo, self.span.hi),
                             }));
                             self.bump();