allow rustc_private feature in force-unstable-if-unmarked crates

This commit is contained in:
Ralf Jung
2024-11-03 07:43:03 +01:00
parent e96808162a
commit 378049633d
4 changed files with 23 additions and 13 deletions

View File

@@ -53,7 +53,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
}
pub fn enforce_recursive_const_stability(&self) -> bool {
// We can skip this if neither `staged_api` nor `-Zforrce-unstable-if-unmarked` are enabled,
// We can skip this if neither `staged_api` nor `-Zforce-unstable-if-unmarked` are enabled,
// since in such crates `lookup_const_stability` will always be `None`.
self.const_kind == Some(hir::ConstContext::ConstFn)
&& (self.tcx.features().staged_api()