mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
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 https://github.com/rust-lang/rust/pull/78782#discussion_r530658904 r? `@petrochenkov`
This commit is contained in:
commit
361543d776
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user