1
Fork 0

honor rustc_const_stable_indirect in non-staged_api crate with -Zforce-unstable-if-unmarked

This commit is contained in:
Ralf Jung 2024-11-02 20:15:18 +01:00
parent 668959740f
commit 686eeb83e9
10 changed files with 155 additions and 3 deletions

View file

@ -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);
}
}
}