Make RawAttrs crate-private

There should be no need to use this from outside
This commit is contained in:
Jonas Schievink
2020-12-19 02:44:00 +01:00
parent 81ccf37d3b
commit a2062d1892
+2 -2
View File
@@ -42,7 +42,7 @@ fn from(Documentation(string): Documentation) -> Self {
/// Syntactical attributes, without filtering of `cfg_attr`s.
#[derive(Default, Debug, Clone, PartialEq, Eq)]
pub struct RawAttrs {
pub(crate) struct RawAttrs {
entries: Option<Arc<[Attr]>>,
}
@@ -72,7 +72,7 @@ fn deref(&self) -> &[Attr] {
}
impl RawAttrs {
pub const EMPTY: Self = Self { entries: None };
pub(crate) const EMPTY: Self = Self { entries: None };
pub(crate) fn new(owner: &dyn AttrsOwner, hygiene: &Hygiene) -> Self {
let (inner_attrs, inner_docs) = inner_attributes(owner.syntax())