diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2022-05-20 19:51:09 -0400 |
|---|---|---|
| committer | Jacob Pratt <jacob@jhpratt.dev> | 2022-05-20 20:04:54 -0400 |
| commit | 49c82f31a85f04a709810de4ccfb8ba765c1377b (patch) | |
| tree | dbcbf74a4c0cef46af19b4b24f04dd2e79e3ea23 /compiler/rustc_expand/src/config.rs | |
| parent | 536020c5f97883aa9f2a90897a5adb520486d2e1 (diff) | |
| download | rust-49c82f31a85f04a709810de4ccfb8ba765c1377b.tar.gz rust-49c82f31a85f04a709810de4ccfb8ba765c1377b.zip | |
Remove `crate` visibility usage in compiler
Diffstat (limited to 'compiler/rustc_expand/src/config.rs')
| -rw-r--r-- | compiler/rustc_expand/src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index 41683db80a3..3cada372570 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -347,7 +347,7 @@ impl<'a> StripUnconfigured<'a> { /// 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 @@ impl<'a> StripUnconfigured<'a> { 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 @@ impl<'a> StripUnconfigured<'a> { } /// 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, |
