Skip to content

remove remaining rustc_allowed_through_unstable_modules#157082

Draft
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:dont_allow_through_unstable_modules
Draft

remove remaining rustc_allowed_through_unstable_modules#157082
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:dont_allow_through_unstable_modules

Conversation

@RalfJung
Copy link
Copy Markdown
Member

@RalfJung RalfJung commented May 28, 2026

Let's see if we can actually fully undo this accidental stabilization. Would be nice to be able to get rid of this hack in the compiler.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 28, 2026
@RalfJung
Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 28, 2026
… r=<try>

remove remaining rustc_allowed_through_unstable_modules
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stability-attribute/accidental-stable-in-unstable/accidental-stable-in-unstable.stderr`
diff of stderr:

7    = help: add `#![feature(unicode_internals)]` to the crate attributes to enable
8    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9 
- warning: use of deprecated module `std::intrinsics`: import this function via `std::mem` instead
-   --> $DIR/accidental-stable-in-unstable.rs:10:23
+ error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
+   --> $DIR/accidental-stable-in-unstable.rs:10:5
12    |
13 LL | use core::intrinsics::transmute; // depended upon by rand_core
-    |                       ^^^^^^^^^
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
-    = note: `#[warn(deprecated)]` on by default
+    = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
17 
- error: aborting due to 1 previous error; 1 warning emitted
+ error: aborting due to 2 previous errors
19 
20 For more information about this error, try `rustc --explain E0658`.
21 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/stability-attribute/accidental-stable-in-unstable.rs:10:5
+ error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
+   --> $DIR/accidental-stable-in-unstable.rs:10:5
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+ error: aborting due to 2 previous errors


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args stability-attribute/accidental-stable-in-unstable.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stability-attribute/accidental-stable-in-unstable.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stability-attribute/accidental-stable-in-unstable" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0658]: use of unstable library feature `unicode_internals`
##[error]  --> /checkout/tests/ui/stability-attribute/accidental-stable-in-unstable.rs:6:5
   |
LL | use core::unicode::UNICODE_VERSION; //~ ERROR use of unstable library feature `unicode_internals`
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unicode_internals)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/accidental-stable-in-unstable.rs:10:5
   |
LL | use core::intrinsics::transmute; // depended upon by rand_core
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

---- [ui] tests/ui/stability-attribute/accidental-stable-in-unstable.rs stdout end ----
---- [ui] tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/stability-attribute/issue-99286-stable-intrinsics" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:11:5
   |
LL | use std::intrinsics::copy_nonoverlapping as _;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:12:5
   |
LL | use std::intrinsics::copy as _;
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:13:5
   |
LL | use std::intrinsics::write_bytes as _;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:14:23
   |
LL | use std::intrinsics::{copy_nonoverlapping, copy, write_bytes};
   |                       ^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:14:44
   |
LL | use std::intrinsics::{copy_nonoverlapping, copy, write_bytes};
   |                                            ^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
##[error]  --> /checkout/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs:14:50
   |
LL | use std::intrinsics::{copy_nonoverlapping, copy, write_bytes};
   |                                                  ^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

☀️ Try build successful (CI)
Build commit: 901d6c1 (901d6c1c62d7c61e05469e996c297476078ee06b, parent: cced03bfd61a304243a34504618ecec86c17063f)

@RalfJung
Copy link
Copy Markdown
Member Author

@craterbot check

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-157082 created and queued.
🤖 Automatically detected try build 901d6c1
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-crater Status: Waiting on a crater run to be completed. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants