Skip to content

Rename rustc_driver::run_compiler to compiler_entrypoint - #163647

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
blyxyas:change-run_compiler-to-compiler_entrypoint
Oct 2, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
blyxyas:change-run_compiler-to-compiler_entrypoint

Conversation

@blyxyas

@blyxyas blyxyas commented Oct 2, 2026

Copy link
Copy Markdown
Member

Having two run_compiler functions has always been confusing and not necessary at all, as they perform fairly different functions. Even more so because rustc_driver::run_compiler calls to rustc_interface::run_compiler. So it seems like a recursive function when it really isn't.

Having two `run_compiler` functions has always been confusing and not necessary at all, as they perform fairly different functions. Even more so because `rustc_driver::run_compiler` calls to `rustc_interface::run_compiler`. So it seems like a recursive function when it really isn't.
@rustbot

rustbot commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

This PR changes rustc_public

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

The rustc-dev-guide subtree was changed. If your future PRs only touch the subtree, consider submitting them directly to rust-lang/rustc-dev-guide, which is where the document is primarily maintained (and has faster CI).

cc @BoxyUwU, @tshepang

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 2, 2026
@rustbot rustbot added T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2026
@rustbot

rustbot commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 19 candidates

@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1859636 has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 2, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 2, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs")
 - #151793 (Add mul_add_relaxed methods for floating-point types)
 - #162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors)
 - #163010 (Miri can do dirfd now)
 - #163535 (Improve `DocStrings` perf)
 - #163576 (Fix `TypeOutlives` fast-path)
 - #163587 (Several small span improvements)
 - #163603 (Reorganise reflection intrinsics)
 - #163612 (fix `ValidateBoundVars`)
 - #163632 (bump rustc-build-sysroot)
 - #163635 (Revert note about signum of NaN)
 - #163644 (Add mailmap entry)
 - #163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`)
 - #163651 (Remove variants from `feature-gate-autodiff-use` test)
@rust-bors
rust-bors Bot merged commit b624ec2 into rust-lang:main Oct 2, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 2, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 2, 2026
Rollup merge of #163647 - blyxyas:change-run_compiler-to-compiler_entrypoint, r=oli-obk

Rename `rustc_driver::run_compiler` to `compiler_entrypoint`

Having two `run_compiler` functions has always been confusing and not necessary at all, as they perform fairly different functions. Even more so because `rustc_driver::run_compiler` calls to `rustc_interface::run_compiler`. So it seems like a recursive function when it really isn't.
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Oct 3, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs")
 - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types)
 - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors)
 - rust-lang/rust#163010 (Miri can do dirfd now)
 - rust-lang/rust#163535 (Improve `DocStrings` perf)
 - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path)
 - rust-lang/rust#163587 (Several small span improvements)
 - rust-lang/rust#163603 (Reorganise reflection intrinsics)
 - rust-lang/rust#163612 (fix `ValidateBoundVars`)
 - rust-lang/rust#163632 (bump rustc-build-sysroot)
 - rust-lang/rust#163635 (Revert note about signum of NaN)
 - rust-lang/rust#163644 (Add mailmap entry)
 - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`)
 - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 5, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs")
 - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types)
 - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors)
 - rust-lang/rust#163010 (Miri can do dirfd now)
 - rust-lang/rust#163535 (Improve `DocStrings` perf)
 - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path)
 - rust-lang/rust#163587 (Several small span improvements)
 - rust-lang/rust#163603 (Reorganise reflection intrinsics)
 - rust-lang/rust#163612 (fix `ValidateBoundVars`)
 - rust-lang/rust#163632 (bump rustc-build-sysroot)
 - rust-lang/rust#163635 (Revert note about signum of NaN)
 - rust-lang/rust#163644 (Add mailmap entry)
 - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`)
 - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
LorrensP-2158466 pushed a commit to LorrensP-2158466/miri that referenced this pull request Oct 6, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs")
 - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types)
 - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors)
 - rust-lang/rust#163010 (Miri can do dirfd now)
 - rust-lang/rust#163535 (Improve `DocStrings` perf)
 - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path)
 - rust-lang/rust#163587 (Several small span improvements)
 - rust-lang/rust#163603 (Reorganise reflection intrinsics)
 - rust-lang/rust#163612 (fix `ValidateBoundVars`)
 - rust-lang/rust#163632 (bump rustc-build-sysroot)
 - rust-lang/rust#163635 (Revert note about signum of NaN)
 - rust-lang/rust#163644 (Add mailmap entry)
 - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`)
 - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
makai410 pushed a commit to makai410/rustc_public that referenced this pull request Oct 9, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs")
 - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types)
 - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors)
 - rust-lang/rust#163010 (Miri can do dirfd now)
 - rust-lang/rust#163535 (Improve `DocStrings` perf)
 - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path)
 - rust-lang/rust#163587 (Several small span improvements)
 - rust-lang/rust#163603 (Reorganise reflection intrinsics)
 - rust-lang/rust#163612 (fix `ValidateBoundVars`)
 - rust-lang/rust#163632 (bump rustc-build-sysroot)
 - rust-lang/rust#163635 (Revert note about signum of NaN)
 - rust-lang/rust#163644 (Add mailmap entry)
 - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`)
 - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
feliperodri added a commit to srivatsansamraj/kani that referenced this pull request Oct 13, 2026
Brings the pinned nightly from nightly-2026-09-25 to nightly-2026-10-11.
The automated update has been failing since 09-26 (model-checking#4935). The range is
about 1,500 rustc commits, but only a handful of changes affect Kani.
One of them changes behaviour quietly, and it is the part worth
reviewing.

**The one that matters: `use` lists in HIR (rust-lang/rust#161349).**
rustc used to lower `use a::{b, c};` into separate items, `use a::b;`
and `use a::c;`. It now keeps a single item holding a tree of imports.
Kani's path resolver (`kani_middle/resolve.rs`), which resolves the
paths in `#[kani::stub]`, contracts and related attributes, found
imported names by scanning those per-name items. Updating only the
pattern would have compiled, but every name imported through a `{...}`
list would have stopped resolving.
`tests/kani/FunctionContracts/cross_module_multiple_impls.rs` would have
caught it, because it imports its contract targets with `use
crate::ty::{D, S};`. The resolver now walks each `use` tree at every
level, looking for the name and collecting globs, with the same
precedence as before: a named import wins over globs. The new
`tests/kani/Stubbing/resolve_use_nested.rs` stubs through a list, a
rename inside a list, a glob inside a list, and a list nested in a list.
It passes on nightly-2026-09-25 as well, and on the new toolchain it
fails with `failed to resolve` for four of its seven stubs if the walk
doesn't recurse.

**Mechanical API updates:**
- `rustc_hir` no longer re-exports the attribute crate
(rust-lang/rust#163250): `Attribute`, `AttrArgs` and `LangItem` now come
from `rustc_attr_ir`.
- `rustc_driver::run_compiler` is now `compiler_entrypoint`
(rust-lang/rust#163647).
- `mir::Terminator::attributes` is now `loop_hint_attrs`. It holds
`#[unroll]` hints, which Kani-built terminators don't carry.
- The `type_id` intrinsic moved to `core::intrinsics::reflection`. I
also fixed the `needs_drop` panic message, which wrongly named
`type_id`.
- In nightly-2026-10-11, `loop_hint_attrs` moved again, from
`Terminator` into `TerminatorKind::Goto` (rust-lang/rust#163931).
- `rustc_abi::Float` gained `PpcF128` (rust-lang/rust#162156), PowerPC's
double-double `long double`. It only exists on PowerPC targets, which
Kani doesn't support, so it is reported as unsupported, like the
existing `F16B` case.

**Test updates.** Importing `copy`, `copy_nonoverlapping` and
`write_bytes` through the accidentally stabilized `core::intrinsics`
path is now a deny-by-default lint (rust-lang/rust#163160). Fifteen
tests did that. They check Kani's model of the intrinsics themselves,
and the `core::ptr` versions add extra debug assertions on top, so the
tests now opt in to `core_intrinsics` instead of switching to `ptr`.
Their expected output is unchanged.

**Test updates, continued.** rustc's diagnostic for
`ui/ice-size-overflow/large_array.rs` now also prints the enclosing
`SizedTypeProperties` trait line, so its expected output gains two
lines. Kani still reports the same E0080 there, without crashing.

**Testing.** I ran `scripts/kani-regression.sh` and
`scripts/kani-llbc-regression.sh` locally on nightly-2026-10-11 (Linux
x86_64, CBMC 6.11.0), with `main` merged in, plus fmt and the three
clippy gates (workspace, `--cfg=kani_sysroot`, `--features llbc`). Every
suite passes. Charon builds unchanged. Locally I cap CBMC at 6 GB, which
makes `push_slow.rs` and `cell_stub.rs` run out of memory on `main` as
well; uncapped, both pass here. I also checked the other `rustc_public`
changes in the range: `PassMode::IndirectUnsized` (Kani only compares
against `PassMode::Ignore`) and a docs-only pointee-size change. Neither
affects Kani.

The earlier CI failures on this PR were the `zerocopy` 0.8.60 break
(model-checking#4988), which zerocopy fixed in 0.8.61; the rerun on the previous head
passed on Linux and macOS-14.

Resolves model-checking#4935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. 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.

5 participants