Skip to content

Conversation

@makai410
Copy link
Contributor

@makai410 makai410 commented Nov 1, 2025

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

@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2025

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2025

r? @celinval

rustbot has assigned @celinval.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants