Skip to content

Commit af66e2e

Browse files
committed
---
yaml --- r: 274775 b: refs/heads/stable c: e797e19 h: refs/heads/master i: 274773: bdd9c14 274771: cf66060 274767: b1f6bf2
1 parent 3682ac3 commit af66e2e

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 798974cae58639c174010fd4a6411dcdc860e404
32+
refs/heads/stable: e797e1961df00ec7725c47225dcf9b5a0e9fce64
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libsyntax/ast.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// The Rust abstract syntax tree.
1212

13-
pub use self::MacStmtStyle::*;
1413
pub use self::MetaItem_::*;
1514
pub use self::Mutability::*;
1615
pub use self::Pat_::*;
@@ -782,13 +781,13 @@ impl StmtKind {
782781
pub enum MacStmtStyle {
783782
/// The macro statement had a trailing semicolon, e.g. `foo! { ... };`
784783
/// `foo!(...);`, `foo![...];`
785-
MacStmtWithSemicolon,
784+
Semicolon,
786785
/// The macro statement had braces; e.g. foo! { ... }
787-
MacStmtWithBraces,
786+
Braces,
788787
/// The macro statement had parentheses or brackets and no semicolon; e.g.
789788
/// `foo!(...)`. All of these will end up being converted into macro
790789
/// expressions.
791-
MacStmtWithoutBraces,
790+
NoBraces,
792791
}
793792

794793
// FIXME (pending discussion of #1697, #2178...): local should really be

branches/stable/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ fn expand_stmt(stmt: P<Stmt>, fld: &mut MacroExpander) -> SmallVector<P<Stmt>> {
533533

534534
// If this is a macro invocation with a semicolon, then apply that
535535
// semicolon to the final statement produced by expansion.
536-
if style == MacStmtWithSemicolon {
536+
if style == MacStmtStyle::Semicolon {
537537
if let Some(stmt) = fully_expanded.pop() {
538538
let new_stmt = stmt.map(|Spanned {node, span}| {
539539
Spanned {

branches/stable/src/libsyntax/parse/parser.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use ast::{ForeignItem, ForeignItemKind, FunctionRetTy};
2626
use ast::{Ident, Inherited, ImplItem, Item, ItemKind};
2727
use ast::{Lit, LitKind, UintTy};
2828
use ast::Local;
29-
use ast::{MacStmtWithBraces, MacStmtWithSemicolon, MacStmtWithoutBraces};
29+
use ast::MacStmtStyle;
3030
use ast::{MutImmutable, MutMutable, Mac_};
3131
use ast::{MutTy, Mutability};
3232
use ast::NamedField;
@@ -3721,9 +3721,9 @@ impl<'a> Parser<'a> {
37213721
let hi = self.last_span.hi;
37223722

37233723
let style = if delim == token::Brace {
3724-
MacStmtWithBraces
3724+
MacStmtStyle::Braces
37253725
} else {
3726-
MacStmtWithoutBraces
3726+
MacStmtStyle::NoBraces
37273727
};
37283728

37293729
if id.name == token::special_idents::invalid.name {
@@ -3734,7 +3734,7 @@ impl<'a> Parser<'a> {
37343734
// if it has a special ident, it's definitely an item
37353735
//
37363736
// Require a semicolon or braces.
3737-
if style != MacStmtWithBraces {
3737+
if style != MacStmtStyle::Braces {
37383738
if !self.eat(&token::Semi) {
37393739
let last_span = self.last_span;
37403740
self.span_err(last_span,
@@ -3841,13 +3841,13 @@ impl<'a> Parser<'a> {
38413841
StmtKind::Expr(e, _) => {
38423842
try!(self.handle_expression_like_statement(e, span, &mut stmts, &mut expr));
38433843
}
3844-
StmtKind::Mac(mac, MacStmtWithoutBraces, attrs) => {
3844+
StmtKind::Mac(mac, MacStmtStyle::NoBraces, attrs) => {
38453845
// statement macro without braces; might be an
38463846
// expr depending on whether a semicolon follows
38473847
match self.token {
38483848
token::Semi => {
38493849
stmts.push(P(Spanned {
3850-
node: StmtKind::Mac(mac, MacStmtWithSemicolon, attrs),
3850+
node: StmtKind::Mac(mac, MacStmtStyle::Semicolon, attrs),
38513851
span: mk_sp(span.lo, self.span.hi),
38523852
}));
38533853
self.bump();
@@ -3872,7 +3872,7 @@ impl<'a> Parser<'a> {
38723872
match self.token {
38733873
token::Semi => {
38743874
stmts.push(P(Spanned {
3875-
node: StmtKind::Mac(m, MacStmtWithSemicolon, attrs),
3875+
node: StmtKind::Mac(m, MacStmtStyle::Semicolon, attrs),
38763876
span: mk_sp(span.lo, self.span.hi),
38773877
}));
38783878
self.bump();

branches/stable/src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,12 +1629,12 @@ impl<'a> State<'a> {
16291629
try!(self.space_if_not_bol());
16301630
try!(self.print_outer_attributes(attrs.as_attr_slice()));
16311631
let delim = match style {
1632-
ast::MacStmtWithBraces => token::Brace,
1632+
ast::MacStmtStyle::Braces => token::Brace,
16331633
_ => token::Paren
16341634
};
16351635
try!(self.print_mac(&**mac, delim));
16361636
match style {
1637-
ast::MacStmtWithBraces => {}
1637+
ast::MacStmtStyle::Braces => {}
16381638
_ => try!(word(&mut self.s, ";")),
16391639
}
16401640
}

0 commit comments

Comments
 (0)