Skip to content

Commit

Permalink
Auto merge of #79433 - calebcartwright:parse-attr-vis, r=petrochenkov
Browse files Browse the repository at this point in the history
rustc_parse: restore public visibility on parse_attribute

Make `parse_attribute` public as rustfmt is a downstream consumer. Refs #78782 (comment)

r? `@petrochenkov`
  • Loading branch information
bors committed Nov 27, 2020
2 parents 72d2a7c + 5930a8a commit 361543d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/rustc_parse/src/parser/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ use rustc_span::{sym, Span};

use tracing::debug;

// Public for rustfmt usage
#[derive(Debug)]
pub(super) enum InnerAttrPolicy<'a> {
pub enum InnerAttrPolicy<'a> {
Permitted,
Forbidden { reason: &'a str, saw_doc_comment: bool, prev_attr_sp: Option<Span> },
}
Expand Down Expand Up @@ -78,7 +79,8 @@ impl<'a> Parser<'a> {

/// Matches `attribute = # ! [ meta_item ]`.
/// `inner_parse_policy` prescribes how to handle inner attributes.
fn parse_attribute(
// Public for rustfmt usage.
pub fn parse_attribute(
&mut self,
inner_parse_policy: InnerAttrPolicy<'_>,
) -> PResult<'a, ast::Attribute> {
Expand Down

0 comments on commit 361543d

Please sign in to comment.