]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/attr.rs
Auto merge of #77616 - jyn514:no-normalize, r=lcnr
[rust.git] / compiler / rustc_parse / src / parser / attr.rs
index 41985757b57af4906812c7682b8774f31cd2c63b..fae09fa6fec65bcb43c283ab2088749427530925 100644 (file)
@@ -8,8 +8,9 @@
 
 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> },
 }
@@ -78,7 +79,8 @@ pub(super) fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<ast::Attribut
 
     /// 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> {