Repository navigation
Upgrade the Rust toolchain to nightly-2026-10-11 - #4987
Merged
feliperodri merged 7 commits intoOct 13, 2026
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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_idusage 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.
rajath-mk
approved these changes
Oct 12, 2026
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
enabled auto-merge
October 13, 2026 09:52
Merged
via the queue into
model-checking:main
with commit Oct 13, 2026
08c1e7c
33 of 34 checks passed
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.
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:
uselists in HIR (rust-lang/rust#161349). rustc used to loweruse a::{b, c};into separate items,use a::b;anduse 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.rswould have caught it, because it imports its contract targets withuse crate::ty::{D, S};. The resolver now walks eachusetree at every level, looking for the name and collecting globs, with the same precedence as before: a named import wins over globs. The newtests/kani/Stubbing/resolve_use_nested.rsstubs 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 withfailed to resolvefor four of its seven stubs if the walk doesn't recurse.Mechanical API updates:
rustc_hirno longer re-exports the attribute crate (Remove rustc_hir's attribute re-exports rust-lang/rust#163250):Attribute,AttrArgsandLangItemnow come fromrustc_attr_ir.rustc_driver::run_compileris nowcompiler_entrypoint(Renamerustc_driver::run_compilertocompiler_entrypointrust-lang/rust#163647).mir::Terminator::attributesis nowloop_hint_attrs. It holds#[unroll]hints, which Kani-built terminators don't carry.type_idintrinsic moved tocore::intrinsics::reflection. I also fixed theneeds_droppanic message, which wrongly namedtype_id.loop_hint_attrsmoved again, fromTerminatorintoTerminatorKind::Goto(Moveloop_hint_attrsfromTerminatorintoTerminatorKind::Gotorust-lang/rust#163931).rustc_abi::FloatgainedPpcF128(add IBM f128 type rust-lang/rust#162156), PowerPC's double-doublelong double. It only exists on PowerPC targets, which Kani doesn't support, so it is reported as unsupported, like the existingF16Bcase.Test updates. Importing
copy,copy_nonoverlappingandwrite_bytesthrough the accidentally stabilizedcore::intrinsicspath 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 thecore::ptrversions add extra debug assertions on top, so the tests now opt in tocore_intrinsicsinstead of switching toptr. Their expected output is unchanged.Test updates, continued. rustc's diagnostic for
ui/ice-size-overflow/large_array.rsnow also prints the enclosingSizedTypePropertiestrait line, so its expected output gains two lines. Kani still reports the same E0080 there, without crashing.Testing. I ran
scripts/kani-regression.shandscripts/kani-llbc-regression.shlocally on nightly-2026-10-11 (Linux x86_64, CBMC 6.11.0), withmainmerged 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 makespush_slow.rsandcell_stub.rsrun out of memory onmainas well; uncapped, both pass here. I also checked the otherrustc_publicchanges in the range:PassMode::IndirectUnsized(Kani only compares againstPassMode::Ignore) and a docs-only pointee-size change. Neither affects Kani.The earlier CI failures on this PR were the
zerocopy0.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