about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-02 20:15:18 +0100
committerRalf Jung <post@ralfj.de>2024-11-10 10:01:27 +0100
commit686eeb83e9c6d7f70848cdf84f490f5c1aa3edd3 (patch)
tree74d0db972f0f0b0a1c75da8ff4361b8051d20124 /compiler/rustc_passes/src
parent668959740f97e7a22ae340742886d330ab63950f (diff)
downloadrust-686eeb83e9c6d7f70848cdf84f490f5c1aa3edd3.tar.gz
rust-686eeb83e9c6d7f70848cdf84f490f5c1aa3edd3.zip
honor rustc_const_stable_indirect in non-staged_api crate with -Zforce-unstable-if-unmarked
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/stability.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs
index cd47c8ece60..264dd364b5b 100644
--- a/compiler/rustc_passes/src/stability.rs
+++ b/compiler/rustc_passes/src/stability.rs
@@ -149,6 +149,11 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
             if let Some(stab) = self.parent_stab {
                 if inherit_deprecation.yes() && stab.is_unstable() {
                     self.index.stab_map.insert(def_id, stab);
+                    if fn_sig.is_some_and(|s| s.header.is_const()) {
+                        let const_stab =
+                            attr::unmarked_crate_const_stab(self.tcx.sess, attrs, stab);
+                        self.index.const_stab_map.insert(def_id, const_stab);
+                    }
                 }
             }