From d71e922fcbd1d702d2f411a58f4db88f530a11a6 Mon Sep 17 00:00:00 2001 From: ozkanonur Date: Fri, 18 Aug 2023 11:22:15 +0300 Subject: [PATCH] fix library doctest: not failing on some feature gates as expected Updating the behavior of `fn is_unstable_reexport` to return false for bootstrap environment would result in a breakage of #94972. This was the quickest and simplest solution to fix this elusive bug, which was only identified through miri tests. Signed-off-by: ozkanonur --- compiler/rustc_passes/src/stability.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index bd2336410b954..50b66f3f8efb1 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -830,6 +830,9 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> { None, path.span, None, + #[cfg(bootstrap)] + AllowUnstable::No, + #[cfg(not(bootstrap))] if is_unstable_reexport(self.tcx, id) { AllowUnstable::Yes } else {