Skip to content

Upgrade the Rust toolchain to nightly-2026-10-11 - #4987

Merged
feliperodri merged 7 commits into
model-checking:mainfrom
feliperodri:toolchain-2026-10-06
Oct 13, 2026
Merged

feliperodri merged 7 commits into
model-checking:mainfrom
feliperodri:toolchain-2026-10-06

Conversation

@feliperodri

@feliperodri feliperodri commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Brings the pinned nightly from nightly-2026-09-25 to nightly-2026-10-11. The automated update has been failing since 09-26 (#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:

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 (#4988), which zerocopy fixed in 0.8.61; the rerun on the previous head passed on Linux and macOS-14.

Resolves #4935

Follow the compiler API changes since nightly-2026-09-25:
- `rustc_hir` no longer re-exports the attribute types
  (rust-lang/rust#163250): import `Attribute`, `AttrArgs` and `LangItem`
  from `rustc_attr_ir`.
- `rustc_driver::run_compiler` is now `compiler_entrypoint`
  (rust-lang/rust#163647).
- `mir::Terminator::attributes` is now `loop_hint_attrs`.
- The `type_id` intrinsic moved to `core::intrinsics::reflection`; update
  the message that names it, and fix the `needs_drop` message, which
  named `type_id` too.
Since rust-lang/rust#161349, `use a::{b, c::{d, *}}` is one HIR item
holding a tree of imports instead of one item per imported name. Walk
the whole tree when resolving a path relative to a module, so that
`#[kani::stub]` and contract paths still find names imported through a
list, a rename inside a list, a glob inside a list, or a nested list.
Matching only the top-level item would compile but stop resolving
those names.

The new test passes on nightly-2026-09-25 too, and fails on the new
toolchain if the walk does not recurse.
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). These tests check Kani's model of the
intrinsics, which `core::ptr` wraps with extra debug assertions, so opt
in to `core_intrinsics` rather than switch to the `ptr` functions.
Also import `type_id` from its new `core::intrinsics::reflection` path.
@feliperodri
feliperodri requested review from a team as code owners October 7, 2026 00:02
@github-actions github-actions Bot added Z-EndToEndBenchCI Tag a PR to run benchmark CI Z-CompilerBenchCI Tag a PR to run benchmark CI labels Oct 7, 2026
@feliperodri
feliperodri requested a balanced review from Copilot October 7, 2026 03:32

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The compiler-private API and import-resolution changes warrant human confirmation of cross-platform and backend regression results.

Review effort: Balanced
Findings: None

What changed in this PR

Upgrades Kani to nightly-2026-10-06, addressing #4935 while preserving import resolution for stubs and contracts.

Changes:

  • Updates compiler-private APIs and the pinned toolchain.
  • Recursively resolves import trees, with regression coverage for nested lists, renames, and globs.
  • Enables intrinsic feature gates in affected tests and updates type_id usage and diagnostics.
File Description
tests/​kani/​Stubbing/​resolve_use_nested.rs Tests stubbing through nested imports.
tests/​kani/​Intrinsics/​Copy/​copy.rs Enables direct intrinsic testing.
tests/​kani/​Intrinsics/​Copy/​copy_nonoverlapping.rs Enables direct intrinsic testing.
tests/​kani/​Intrinsics/​ConstEval/​type_id.rs Updates the type_id import.
tests/​expected/​valid-value-checks/​write_invalid.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​write_bytes/​unaligned/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy/​copy-unwritable-dst/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy/​copy-unreadable-src/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy/​copy-unaligned-src/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy/​copy-unaligned-dst/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy/​copy-overflow/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-unwritable-dst/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-unreadable-src/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-unaligned-src/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-unaligned-dst/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-overlapping/​main.rs Enables intrinsic feature gates.
tests/​expected/​intrinsics/​copy-nonoverlapping/​copy-overflow/​main.rs Enables intrinsic feature gates.
rust-toolchain.toml Pins the newer nightly.
kani-compiler/​src/​main.rs Updates compiler entrypoint and crate imports.
kani-compiler/​src/​kani_middle/​transform/​rustc_intrinsics.rs Updates the LangItem import.
kani-compiler/​src/​kani_middle/​transform/​internal_mir.rs Adopts loop_hint_attrs.
kani-compiler/​src/​kani_middle/​resolve.rs Traverses import trees recursively.
kani-compiler/​src/​kani_middle/​coercion.rs Updates the LangItem import.
kani-compiler/​src/​kani_middle/​attributes.rs Updates attribute imports and documentation.
kani-compiler/​src/​kani_compiler.rs Uses the renamed compiler entrypoint.
kani-compiler/​src/​intrinsics.rs Corrects intrinsic panic messages.
kani-compiler/​src/​codegen_cprover_gotoc/​overrides/​hooks.rs Updates the LangItem import.
kani-compiler/​src/​codegen_cprover_gotoc/​codegen/​span.rs Updates the Attribute import.
kani-compiler/​src/​codegen_aeneas_llbc/​mir_to_ullbc/​mod.rs Updates LLBC’s LangItem reference.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- `loop_hint_attrs` moved from `mir::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 report it as unsupported like `F16B`.
- rustc's diagnostic for `ui/ice-size-overflow` now also prints the
  enclosing `SizedTypeProperties` trait line; update the expected output.
@feliperodri feliperodri changed the title Upgrade the Rust toolchain to nightly-2026-10-06 Upgrade the Rust toolchain to nightly-2026-10-11 Oct 11, 2026
@feliperodri
feliperodri added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
RUSTSEC-2024-0449 now fails the advisories check. unsafe-libyaml is only
reached through serde_yaml in compiletest, which is test tooling and not
part of Kani releases.
@feliperodri
feliperodri enabled auto-merge October 13, 2026 09:52
@feliperodri
feliperodri added this pull request to the merge queue Oct 13, 2026
Merged via the queue into model-checking:main with commit 08c1e7c Oct 13, 2026
33 of 34 checks passed
@feliperodri
feliperodri deleted the toolchain-2026-10-06 branch October 13, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-CompilerBenchCI Tag a PR to run benchmark CI Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolchain upgrade to nightly-2026-09-26 failed

4 participants