From b093060c2a122ff1433bbb46aa603b99be5ef8f9 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 1 Oct 2015 18:03:34 +0200 Subject: Stop re-exporting AttrStyle's variants and rename them. --- src/libsyntax/parse/attr.rs | 12 ++++++------ src/libsyntax/parse/lexer/comments.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax/parse') 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 } } -- cgit 1.4.1-3-g733a5