about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-17 08:02:26 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-17 08:02:26 +0200
commit49ae52e3ffeb3d98f19845eba5eb9fa1408fa432 (patch)
tree75f3f2703f52b176c412542e15d6c8ab8b76baf4
parent5795086bdfe7ed988aa53a110bd0692c33d8755b (diff)
downloadrust-49ae52e3ffeb3d98f19845eba5eb9fa1408fa432.tar.gz
rust-49ae52e3ffeb3d98f19845eba5eb9fa1408fa432.zip
Fix encoding of `link_section` and `no_mangle` cross crate
-rw-r--r--compiler/rustc_attr_data_structures/src/encode_cross_crate.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs b/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs
index 3e2dc0a15b2..c24b45e83f9 100644
--- a/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs
+++ b/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs
@@ -40,9 +40,9 @@ impl AttributeKind {
             Fundamental { .. } => Yes,
             Ignore { .. } => No,
             Inline(..) => No,
-            LinkName { .. } => Yes,
+            LinkName { .. } => Yes, // Needed for rustdoc
             LinkOrdinal { .. } => No,
-            LinkSection { .. } => No,
+            LinkSection { .. } => Yes, // Needed for rustdoc
             LoopMatch(..) => No,
             MacroTransparency(..) => Yes,
             Marker(..) => No,
@@ -50,8 +50,8 @@ impl AttributeKind {
             MustUse { .. } => Yes,
             Naked(..) => No,
             NoImplicitPrelude(..) => No,
-            NoMangle(..) => No,
-            NonExhaustive(..) => Yes,
+            NoMangle(..) => Yes,      // Needed for rustdoc
+            NonExhaustive(..) => Yes, // Needed for rustdoc
             OmitGdbPrettyPrinterSection => No,
             Optimize(..) => No,
             ParenSugar(..) => No,