Skip to content

Commit 5930a8a

Browse files
rustc_parse: restore pub vis on parse_attribute
1 parent b48cafd commit 5930a8a

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)