diff options
| author | Ms2ger <Ms2ger@gmail.com> | 2015-10-01 18:03:34 +0200 |
|---|---|---|
| committer | Ms2ger <Ms2ger@gmail.com> | 2015-10-01 18:03:34 +0200 |
| commit | b093060c2a122ff1433bbb46aa603b99be5ef8f9 (patch) | |
| tree | 734792d961612a65d511cff23d136728877b7448 /src/libsyntax/parse | |
| parent | 24202c6431a29d18f58c6d7302d6a9095e218395 (diff) | |
| download | rust-b093060c2a122ff1433bbb46aa603b99be5ef8f9.tar.gz rust-b093060c2a122ff1433bbb46aa603b99be5ef8f9.zip | |
Stop re-exporting AttrStyle's variants and rename them.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer/comments.rs | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index 015cf60f0cf..219360093d1 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -44,7 +44,7 @@ impl<'a> ParserAttr for Parser<'a> { self.span.lo, self.span.hi ); - if attr.node.style != ast::AttrOuter { + if attr.node.style != ast::AttrStyle::Outer { panic!(self.fatal("expected outer comment")); } attrs.push(attr); @@ -79,9 +79,9 @@ impl<'a> ParserAttr for Parser<'a> { self.fileline_help(span, "place inner attribute at the top of the module or block"); } - ast::AttrInner + ast::AttrStyle::Inner } else { - ast::AttrOuter + ast::AttrStyle::Outer }; panictry!(self.expect(&token::OpenDelim(token::Bracket))); @@ -101,7 +101,7 @@ impl<'a> ParserAttr for Parser<'a> { panictry!(self.bump()); self.span_warn(span, "this inner attribute syntax is deprecated. \ The new syntax is `#![foo]`, with a bang and no semicolon"); - style = ast::AttrInner; + style = ast::AttrStyle::Inner; } return Spanned { @@ -131,7 +131,7 @@ impl<'a> ParserAttr for Parser<'a> { } let attr = self.parse_attribute(true); - assert!(attr.node.style == ast::AttrInner); + assert!(attr.node.style == ast::AttrStyle::Inner); attrs.push(attr); } token::DocComment(s) => { @@ -139,7 +139,7 @@ impl<'a> ParserAttr for Parser<'a> { let Span { lo, hi, .. } = self.span; let str = self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)); let attr = attr::mk_sugared_doc_attr(attr::mk_attr_id(), str, lo, hi); - if attr.node.style == ast::AttrInner { + if attr.node.style == ast::AttrStyle::Inner { attrs.push(attr); panictry!(self.bump()); } else { diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index 9033208fbdb..137996a35ee 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -52,9 +52,9 @@ pub fn is_doc_comment(s: &str) -> bool { pub fn doc_comment_style(comment: &str) -> ast::AttrStyle { assert!(is_doc_comment(comment)); if comment.starts_with("//!") || comment.starts_with("/*!") { - ast::AttrInner + ast::AttrStyle::Inner } else { - ast::AttrOuter + ast::AttrStyle::Outer } } |
