diff options
| author | surechen <chenshuo17@huawei.com> | 2024-03-19 00:05:18 +0800 |
|---|---|---|
| committer | surechen <chenshuo17@huawei.com> | 2024-03-19 20:13:40 +0800 |
| commit | db48dfcd03ec039eb1741becf7f445a66af6761b (patch) | |
| tree | 6d073247eee0bd66779999f64f3fb65ba11c671b /compiler/rustc_metadata/src | |
| parent | 3cdcdaf31b45f8045164aae9604573d23091970b (diff) | |
| download | rust-db48dfcd03ec039eb1741becf7f445a66af6761b.tar.gz rust-db48dfcd03ec039eb1741becf7f445a66af6761b.zip | |
Change only_local to enum type and change the macros to always require a variant of that enum.
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index d8cfceab460..df221b9273a 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -817,8 +817,8 @@ struct AnalyzeAttrState { #[inline] fn analyze_attr(attr: &Attribute, state: &mut AnalyzeAttrState) -> bool { let mut should_encode = false; - if rustc_feature::is_builtin_only_local(attr.name_or_empty()) { - // Attributes marked local-only don't need to be encoded for downstream crates. + if !rustc_feature::encode_cross_crate(attr.name_or_empty()) { + // Attributes not marked encode-cross-crate don't need to be encoded for downstream crates. } else if attr.doc_str().is_some() { // We keep all doc comments reachable to rustdoc because they might be "imported" into // downstream crates if they use `#[doc(inline)]` to copy an item's documentation into |
