Skip to content

Upgrade Rust toolchain to nightly-2026-01-29 - #4651

Merged
tautschnig merged 1 commit into
model-checking:mainfrom
tautschnig:toolchain-2026-01-29-manual
Jul 17, 2026
Merged

Upgrade Rust toolchain to nightly-2026-01-29#4651
tautschnig merged 1 commit into
model-checking:mainfrom
tautschnig:toolchain-2026-01-29-manual

Conversation

@tautschnig

Copy link
Copy Markdown
Member

Advance from nightly-2026-01-27 to nightly-2026-01-29. Two source changes are required (both first needed at nightly-2026-01-28); 01-29 then also passes with no further changes.

  • Don't expose redundant information in rustc_public's LayoutShape rust-lang/rust#151040 ("public-variant-layout") reworked VariantsShape::Multiple: its variants are now VariantFields values that expose offsets and fields_by_offset_order() directly, instead of LayoutShapes whose fields: FieldsShape had to be destructured. Update the two enum-layout walkers (check_uninit/ty_layout.rs and check_values.rs) to use the per-variant offsets directly (the latter previously indexed the enum's top-level offsets, which only cover the tag).

  • nightly-2026-01-28's HashMap/SwissTable lowers Simd::splat through the simd_splat intrinsic, which Kani did not model (unsupported construct). Add simd_splat support: broadcast the scalar argument to every lane of the result vector.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Copilot AI review requested due to automatic review settings July 17, 2026 12:00
@tautschnig
tautschnig requested a review from a team as a code owner July 17, 2026 12:00
@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 Jul 17, 2026

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.

Pull request overview

This PR updates Kani to build against Rust nightly-2026-01-29 by adapting to recent rustc layout API changes for enums and by adding support for the simd_splat intrinsic introduced in the new SwissTable lowering path.

Changes:

  • Bump pinned Rust toolchain from nightly-2026-01-27 to nightly-2026-01-29.
  • Update enum-layout walkers to use per-variant field offsets (variant.offsets) for VariantsShape::Multiple.
  • Add simd_splat intrinsic recognition plus CPROVER codegen support, and classify it alongside other SIMD intrinsics for analyses.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rust-toolchain.toml Advances pinned Rust nightly toolchain version.
kani-compiler/src/kani_middle/transform/check_values.rs Fixes enum field offset walking for multi-variant layouts using per-variant offsets.
kani-compiler/src/kani_middle/transform/check_uninit/ty_layout.rs Fixes enum field offset walking for uninit checks using per-variant offsets.
kani-compiler/src/kani_middle/transform/check_uninit/ptr_uninit/uninit_visitor.rs Treats SimdSplat as a SIMD intrinsic in uninit visitor skip logic.
kani-compiler/src/kani_middle/points_to/points_to_analysis.rs Treats SimdSplat as a SIMD intrinsic in identity-aliasing classification.
kani-compiler/src/intrinsics.rs Adds SimdSplat to intrinsic enum and matches "simd_splat".
kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs Implements codegen for SimdSplat by broadcasting scalar to all lanes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs
Advance from nightly-2026-01-27 to nightly-2026-01-29. Two source changes are
required (both first needed at nightly-2026-01-28); 01-29 then also passes with
no further changes.

- rust-lang/rust#151040 ("public-variant-layout") reworked
  `VariantsShape::Multiple`: its `variants` are now `VariantFields` values that
  expose `offsets` and `fields_by_offset_order()` directly, instead of
  `LayoutShape`s whose `fields: FieldsShape` had to be destructured. Update the
  two enum-layout walkers (check_uninit/ty_layout.rs and check_values.rs) to use
  the per-variant `offsets` directly (the latter previously indexed the enum's
  top-level offsets, which only cover the tag).

- nightly-2026-01-28's HashMap/SwissTable lowers `Simd::splat` through the
  `simd_splat` intrinsic, which Kani did not model (unsupported construct). Add
  `simd_splat` support: broadcast the scalar argument to every lane of the
  result vector. Since `simd_splat<T, U>(value: U) -> T` has independent generic
  parameters, an instantiation where `U` is not `T`'s element type can reach
  codegen; reject it with a type-mismatch error like rustc's backends (and like
  Kani's `simd_extract`/`simd_insert`) instead of silently casting, and add the
  `simd-splat-wrong-type` expected test for it.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@tautschnig
tautschnig force-pushed the toolchain-2026-01-29-manual branch from 585f1db to 42ad2a9 Compare July 17, 2026 13:58
@tautschnig
tautschnig enabled auto-merge July 17, 2026 14:20
@tautschnig
tautschnig added this pull request to the merge queue Jul 17, 2026
Merged via the queue into model-checking:main with commit 39a98b6 Jul 17, 2026
34 of 36 checks passed
@tautschnig
tautschnig deleted the toolchain-2026-01-29-manual branch July 17, 2026 15:39
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.

3 participants