about summary refs log tree commit diff
path: root/tests/rustdoc-js/module-substring.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-11-12 18:11:04 +0100
committerGitHub <noreply@github.com>2024-11-12 18:11:04 +0100
commit2285535d04fb73d5eb87ab18757c42f99f130baa (patch)
tree0b5fea0c753b4a28d222b0a9e4b1165ef54d0a32 /tests/rustdoc-js/module-substring.js
parente5b1caef8518aa4d98719e3901c9baea37ec24fc (diff)
parent353f8e13231ad6472b349e34aa201bba814653a7 (diff)
downloadrust-2285535d04fb73d5eb87ab18757c42f99f130baa.tar.gz
rust-2285535d04fb73d5eb87ab18757c42f99f130baa.zip
Rollup merge of #132541 - RalfJung:const-stable-extern-crate, r=compiler-errors
Proper support for cross-crate recursive const stability checks

~~Stacked on top of https://github.com/rust-lang/rust/pull/132492; only the last three commits are new.~~

In a crate without `staged_api` but with `-Zforce-unstable-if-unmarked`, we now subject all functions marked with `#[rustc_const_stable_indirect]` to recursive const stability checks. We require an opt-in so that by default, a crate can be built with `-Zforce-unstable-if-unmarked` and use nightly features as usual. This property is recorded in the crate metadata so when a `staged_api` crate calls such a function, it sees the `#[rustc_const_stable_indirect]` and allows it to be exposed on stable. This, finally, will let us expose `const fn` from hashbrown on stable.

The second commit makes const stability more like regular stability: via `check_missing_const_stability`, we ensure that all publicly reachable functions have a const stability attribute -- both in  `staged_api` crates and `-Zforce-unstable-if-unmarked` crates. To achieve this, we move around the stability computation so that const stability is computed after regular stability is done. This lets us access the final result of the regular stability computation, which we use so that `const fn` can inherit the regular stability (but only if that is "unstable"). Fortunately, this lets us get rid of an `Option` in `ConstStability`.

This is the last PR that I have planned in this series.

r? `@compiler-errors`
Diffstat (limited to 'tests/rustdoc-js/module-substring.js')
0 files changed, 0 insertions, 0 deletions