We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b48cafd commit 5930a8aCopy full SHA for 5930a8a
compiler/rustc_parse/src/parser/attr.rs
@@ -8,8 +8,9 @@ use rustc_span::{sym, Span};
8
9
use tracing::debug;
10
11
+// Public for rustfmt usage
12
#[derive(Debug)]
-pub(super) enum InnerAttrPolicy<'a> {
13
+pub enum InnerAttrPolicy<'a> {
14
Permitted,
15
Forbidden { reason: &'a str, saw_doc_comment: bool, prev_attr_sp: Option<Span> },
16
}
@@ -78,7 +79,8 @@ impl<'a> Parser<'a> {
78
79
80
/// Matches `attribute = # ! [ meta_item ]`.
81
/// `inner_parse_policy` prescribes how to handle inner attributes.
- fn parse_attribute(
82
+ // Public for rustfmt usage.
83
+ pub fn parse_attribute(
84
&mut self,
85
inner_parse_policy: InnerAttrPolicy<'_>,
86
) -> PResult<'a, ast::Attribute> {
0 commit comments