about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-19 18:03:52 +0100
committerGitHub <noreply@github.com>2024-03-19 18:03:52 +0100
commitea7ea2df86533dd8cb8561b69f5142d650a23539 (patch)
treea7a8dfa30a41936c71a6048471b0d38a049843ef /compiler/rustc_metadata/src
parent2ad2492b7b5b0e368b196eff3572bdb556bb2862 (diff)
parentdb48dfcd03ec039eb1741becf7f445a66af6761b (diff)
downloadrust-ea7ea2df86533dd8cb8561b69f5142d650a23539.tar.gz
rust-ea7ea2df86533dd8cb8561b69f5142d650a23539.zip
Rollup merge of #122695 - surechen:make_only_local_explict_argument, r=lcnr
Change only_local to a enum type.

Change only_local to enum type and change the macros to always require a variant of that enum.

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_metadata/src')
-rw-r--r--compiler/rustc_metadata/src/rmeta/encoder.rs4
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 0a9659745db..8dfd6f14cce 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