about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorCaleb Cartwright <caleb.cartwright@outlook.com>2020-11-25 19:54:08 -0600
committerCaleb Cartwright <caleb.cartwright@outlook.com>2020-11-26 12:54:09 -0600
commit5930a8ab1258e9de11cdc6dc8a9275e44ea7d38e (patch)
tree5684b544432a15ca907dfdf23c53f0b57787fb15 /compiler/rustc_parse/src/parser
parentb48cafd9eb658b5d74015ddbe5335c3842a03a63 (diff)
downloadrust-5930a8ab1258e9de11cdc6dc8a9275e44ea7d38e.tar.gz
rust-5930a8ab1258e9de11cdc6dc8a9275e44ea7d38e.zip
rustc_parse: restore pub vis on parse_attribute
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/attr.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs
index 41985757b57..fae09fa6fec 100644
--- a/compiler/rustc_parse/src/parser/attr.rs
+++ b/compiler/rustc_parse/src/parser/attr.rs
@@ -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> },
 }
@@ -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> {