]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_expand/src/config.rs
Rollup merge of #98385 - m-ou-se:llvm-12-memory-order, r=petrochenkov
[rust.git] / compiler / rustc_expand / src / config.rs
index 41683db80a314337ba2a0264cbc837f0e1cac81e..3cada372570851c44e7dfe48c5fd640061ca286d 100644 (file)
@@ -347,7 +347,7 @@ fn process_cfg_attr(&self, attr: Attribute) -> Vec<Attribute> {
     /// Gives a compiler warning when the `cfg_attr` contains no attributes and
     /// is in the original source file. Gives a compiler error if the syntax of
     /// the attribute is incorrect.
-    crate fn expand_cfg_attr(&self, attr: Attribute, recursive: bool) -> Vec<Attribute> {
+    pub(crate) fn expand_cfg_attr(&self, attr: Attribute, recursive: bool) -> Vec<Attribute> {
         let Some((cfg_predicate, expanded_attrs)) =
             rustc_parse::parse_cfg_attr(&attr, &self.sess.parse_sess) else {
                 return vec![];
@@ -451,7 +451,7 @@ fn in_cfg(&self, attrs: &[Attribute]) -> bool {
         attrs.iter().all(|attr| !is_cfg(attr) || self.cfg_true(attr))
     }
 
-    crate fn cfg_true(&self, attr: &Attribute) -> bool {
+    pub(crate) fn cfg_true(&self, attr: &Attribute) -> bool {
         let meta_item = match validate_attr::parse_meta(&self.sess.parse_sess, attr) {
             Ok(meta_item) => meta_item,
             Err(mut err) => {
@@ -465,7 +465,7 @@ fn in_cfg(&self, attrs: &[Attribute]) -> bool {
     }
 
     /// If attributes are not allowed on expressions, emit an error for `attr`
-    crate fn maybe_emit_expr_attr_err(&self, attr: &Attribute) {
+    pub(crate) fn maybe_emit_expr_attr_err(&self, attr: &Attribute) {
         if !self.features.map_or(true, |features| features.stmt_expr_attributes) {
             let mut err = feature_err(
                 &self.sess.parse_sess,