Fix some issues around rustc_public#148358
Merged
bors merged 1 commit intorust-lang:mainfrom Nov 26, 2025
Merged
Conversation
Collaborator
Collaborator
celinval
reviewed
Nov 5, 2025
compiler/rustc_public/src/lib.rs
Outdated
| pub mod abi; | ||
| mod alloc; | ||
| pub(crate) mod unstable; | ||
| pub mod unstable; |
Contributor
There was a problem hiding this comment.
I don't think we should make this module public. Instead, we should add an attribute to the trait declarations:
/// This is used by the public `rustc_internal::stable` function when feature `rustc_internal` is enabled.
#[cfg_attr(not(feature = "rustc_internal"), allow(unreachable_pub))]
pub trait Stable<'tcx>: PointeeSized {
// ...
}| // A thread local variable that stores a pointer to [`CompilerInterface`]. | ||
| scoped_tls::scoped_thread_local!(static TLV: Cell<*const ()>); | ||
|
|
||
| // FIXME(makai410): remove this cfg when we have a stable driver. |
Contributor
There was a problem hiding this comment.
I don't think we need this FIXME... Maybe just a comment. We could also move this function to be inside rustc_internal.
fc3057b to
1f7a342
Compare
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Nov 18, 2025
Fix some issues around `rustc_public` cc #148266 . follow-up of #148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
Collaborator
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
bend-n
added a commit
to bend-n/rust
that referenced
this pull request
Nov 23, 2025
Fix some issues around `rustc_public` cc rust-lang#148266 . follow-up of rust-lang#148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
Member
|
fyi bors thinks that this PR has not been approved, probably because of the spurious apple failure. you should be able to reapprove with |
Contributor
|
Let's try again! @bors retry |
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Nov 26, 2025
Fix some issues around `rustc_public` cc rust-lang#148266 . follow-up of rust-lang#148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
bors
added a commit
that referenced
this pull request
Nov 26, 2025
Rollup of 9 pull requests Successful merges: - #147936 (Offload intrinsic) - #148358 (Fix some issues around `rustc_public`) - #148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - #148751 (Build gnullvm toolchains on Windows natively) - #148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - #149173 (Use rust rather than LLVM target features in the target spec) - #149307 (Deny const auto traits) - #149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - #149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 26, 2025
Fix some issues around `rustc_public` cc rust-lang#148266 . follow-up of rust-lang#148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
bors
added a commit
that referenced
this pull request
Nov 26, 2025
Rollup of 12 pull requests Successful merges: - #147936 (Offload intrinsic) - #148358 (Fix some issues around `rustc_public`) - #148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - #148751 (Build gnullvm toolchains on Windows natively) - #148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - #149149 ([rustdoc] misc search index cleanups) - #149173 (Use rust rather than LLVM target features in the target spec) - #149307 (Deny const auto traits) - #149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - #149317 (Handle inline asm in has_ffi_unwind_calls) - #149326 (Remove unused `Clone` derive on `DelayedLint`) - #149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Nov 26, 2025
Rollup merge of #148358 - makai410:rpub-test-fix, r=celinval Fix some issues around `rustc_public` cc #148266 . follow-up of #148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Nov 27, 2025
Rollup of 12 pull requests Successful merges: - rust-lang/rust#147936 (Offload intrinsic) - rust-lang/rust#148358 (Fix some issues around `rustc_public`) - rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively) - rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - rust-lang/rust#149149 ([rustdoc] misc search index cleanups) - rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec) - rust-lang/rust#149307 (Deny const auto traits) - rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls) - rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`) - rust-lang/rust#149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rustc_public
that referenced
this pull request
Dec 10, 2025
Rollup of 12 pull requests Successful merges: - rust-lang/rust#147936 (Offload intrinsic) - rust-lang/rust#148358 (Fix some issues around `rustc_public`) - rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively) - rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - rust-lang/rust#149149 ([rustdoc] misc search index cleanups) - rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec) - rust-lang/rust#149307 (Deny const auto traits) - rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls) - rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`) - rust-lang/rust#149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
makai410
pushed a commit
to makai410/rust
that referenced
this pull request
Dec 10, 2025
Fix some issues around `rustc_public` cc rust-lang#148266 . follow-up of rust-lang#148341 . This fixes the issues that can be reproduced by `x test compiler/rustc_public`: ``` error: function `run` is never used --> compiler/rustc_public/src/compiler_interface.rs:838:15 | 838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error> | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:25:1 | 25 | pub trait InternalCx<'tcx>: Copy + Clone { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:62:1 | 62 | pub trait Stable<'tcx>: PointeeSized { | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: unreachable `pub` item --> compiler/rustc_public/src/unstable/mod.rs:81:1 | 81 | pub trait RustcInternal { | ---^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `rustc_public` (lib) due to 4 previous errors ```
makai410
pushed a commit
to makai410/rust
that referenced
this pull request
Dec 10, 2025
Rollup of 12 pull requests Successful merges: - rust-lang#147936 (Offload intrinsic) - rust-lang#148358 (Fix some issues around `rustc_public`) - rust-lang#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - rust-lang#148751 (Build gnullvm toolchains on Windows natively) - rust-lang#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - rust-lang#149149 ([rustdoc] misc search index cleanups) - rust-lang#149173 (Use rust rather than LLVM target features in the target spec) - rust-lang#149307 (Deny const auto traits) - rust-lang#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - rust-lang#149317 (Handle inline asm in has_ffi_unwind_calls) - rust-lang#149326 (Remove unused `Clone` derive on `DelayedLint`) - rust-lang#149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
Kobzol
pushed a commit
to Kobzol/rustc_codegen_gcc
that referenced
this pull request
Dec 21, 2025
Rollup of 12 pull requests Successful merges: - rust-lang/rust#147936 (Offload intrinsic) - rust-lang/rust#148358 (Fix some issues around `rustc_public`) - rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors) - rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively) - rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME) - rust-lang/rust#149149 ([rustdoc] misc search index cleanups) - rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec) - rust-lang/rust#149307 (Deny const auto traits) - rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target) - rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls) - rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`) - rust-lang/rust#149341 (Add `Copy` to some AST enums.) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc #148266 .
follow-up of #148341 .
This fixes the issues that can be reproduced by
x test compiler/rustc_public: