Skip to content

Commit

Permalink
Upgrade toolchain to 2024-10-29 (model-checking#3658)
Browse files Browse the repository at this point in the history
Culprit PR identified by @tautschnig:
rust-lang/rust#132252

Resolves model-checking#3657 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
  • Loading branch information
zhassan-aws authored Oct 29, 2024
1 parent 52fcc6c commit 87cd331
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use rustc_middle::ty::{List, TypeFoldable};
use rustc_smir::rustc_internal;
use rustc_span::def_id::DefId;
use rustc_target::abi::{
Abi::Vector, FieldIdx, FieldsShape, Float, Integer, LayoutS, Primitive, Size, TagEncoding,
Abi::Vector, FieldIdx, FieldsShape, Float, Integer, LayoutData, Primitive, Size, TagEncoding,
TyAndLayout, VariantIdx, Variants,
};
use stable_mir::abi::{ArgAbi, FnAbi, PassMode};
Expand Down Expand Up @@ -675,7 +675,7 @@ impl<'tcx> GotocCtx<'tcx> {
fn codegen_alignment_padding(
&self,
size: Size,
layout: &LayoutS<FieldIdx, VariantIdx>,
layout: &LayoutData<FieldIdx, VariantIdx>,
idx: usize,
) -> Option<DatatypeComponent> {
let align = Size::from_bits(layout.align.abi.bits());
Expand All @@ -700,7 +700,7 @@ impl<'tcx> GotocCtx<'tcx> {
fn codegen_struct_fields(
&mut self,
flds: Vec<(String, Ty<'tcx>)>,
layout: &LayoutS<FieldIdx, VariantIdx>,
layout: &LayoutData<FieldIdx, VariantIdx>,
initial_offset: Size,
) -> Vec<DatatypeComponent> {
match &layout.fields {
Expand Down Expand Up @@ -1112,7 +1112,7 @@ impl<'tcx> GotocCtx<'tcx> {
&mut self,
variant: &VariantDef,
subst: &'tcx GenericArgsRef<'tcx>,
layout: &LayoutS<FieldIdx, VariantIdx>,
layout: &LayoutData<FieldIdx, VariantIdx>,
initial_offset: Size,
) -> Vec<DatatypeComponent> {
let flds: Vec<_> =
Expand Down Expand Up @@ -1251,7 +1251,7 @@ impl<'tcx> GotocCtx<'tcx> {
// https://github.com/rust-lang/rust/blob/e60ebb2f2c1facba87e7971798f3cbdfd309cd23/compiler/rustc_session/src/code_stats.rs#L166
let max_variant_size = variants
.iter()
.map(|l: &LayoutS<FieldIdx, VariantIdx>| l.size)
.map(|l: &LayoutData<FieldIdx, VariantIdx>| l.size)
.max()
.unwrap();
let max_variant_size = std::cmp::max(max_variant_size, discr_offset);
Expand Down Expand Up @@ -1298,7 +1298,7 @@ impl<'tcx> GotocCtx<'tcx> {
ty: Ty<'tcx>,
adtdef: &'tcx AdtDef,
subst: &'tcx GenericArgsRef<'tcx>,
variants: &IndexVec<VariantIdx, LayoutS<FieldIdx, VariantIdx>>,
variants: &IndexVec<VariantIdx, LayoutData<FieldIdx, VariantIdx>>,
) -> Type {
let non_zst_count = variants.iter().filter(|layout| layout.size.bytes() > 0).count();
let mangled_name = self.ty_mangled_name(ty);
Expand All @@ -1317,7 +1317,7 @@ impl<'tcx> GotocCtx<'tcx> {

pub(crate) fn variant_min_offset(
&self,
variants: &IndexVec<VariantIdx, LayoutS<FieldIdx, VariantIdx>>,
variants: &IndexVec<VariantIdx, LayoutData<FieldIdx, VariantIdx>>,
) -> Option<Size> {
variants
.iter()
Expand Down Expand Up @@ -1407,7 +1407,7 @@ impl<'tcx> GotocCtx<'tcx> {
pretty_name: InternedString,
def: &'tcx AdtDef,
subst: &'tcx GenericArgsRef<'tcx>,
layouts: &IndexVec<VariantIdx, LayoutS<FieldIdx, VariantIdx>>,
layouts: &IndexVec<VariantIdx, LayoutData<FieldIdx, VariantIdx>>,
initial_offset: Size,
) -> Vec<DatatypeComponent> {
def.variants()
Expand Down Expand Up @@ -1439,7 +1439,7 @@ impl<'tcx> GotocCtx<'tcx> {
pretty_name: InternedString,
case: &VariantDef,
subst: &'tcx GenericArgsRef<'tcx>,
variant: &LayoutS<FieldIdx, VariantIdx>,
variant: &LayoutData<FieldIdx, VariantIdx>,
initial_offset: Size,
) -> Type {
let case_name = format!("{name}::{}", case.name);
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

[toolchain]
channel = "nightly-2024-10-28"
channel = "nightly-2024-10-29"
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

0 comments on commit 87cd331

Please sign in to comment.