Skip to content

Commit 361543d

Browse files
committed
Auto merge of #79433 - calebcartwright:parse-attr-vis, r=petrochenkov
rustc_parse: restore public visibility on parse_attribute Make `parse_attribute` public as rustfmt is a downstream consumer. Refs #78782 (comment) r? `@petrochenkov`
2 parents 72d2a7c + 5930a8a commit 361543d

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+4
-2
lines changed

compiler/rustc_parse/src/parser/attr.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ use rustc_span::{sym, Span};
88

99
use tracing::debug;
1010

11+
// Public for rustfmt usage
1112
#[derive(Debug)]
12-
pub(super) enum InnerAttrPolicy<'a> {
13+
pub enum InnerAttrPolicy<'a> {
1314
Permitted,
1415
Forbidden { reason: &'a str, saw_doc_comment: bool, prev_attr_sp: Option<Span> },
1516
}
@@ -78,7 +79,8 @@ impl<'a> Parser<'a> {
7879

7980
/// Matches `attribute = # ! [ meta_item ]`.
8081
/// `inner_parse_policy` prescribes how to handle inner attributes.
81-
fn parse_attribute(
82+
// Public for rustfmt usage.
83+
pub fn parse_attribute(
8284
&mut self,
8385
inner_parse_policy: InnerAttrPolicy<'_>,
8486
) -> PResult<'a, ast::Attribute> {

0 commit comments

Comments
 (0)