Skip to content

Commit 6796bb4

Browse files
Upgrade Rust toolchain to 2025-07-10 (#4215)
Update the import path for stable-mir's rustc_internal, IndexVal, and run_with_ctx. rust-lang/rust@da25619e2a. Resolves #4214 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent 361ccea commit 6796bb4

38 files changed

+48
-46
lines changed

kani-compiler/src/codegen_aeneas_llbc/compiler_interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ use rustc_middle::util::Providers;
3636
use rustc_session::Session;
3737
use rustc_session::config::{CrateType, OutputFilenames, OutputType};
3838
use rustc_session::output::out_filename;
39-
use rustc_smir::rustc_internal;
4039
use stable_mir::mir::mono::{Instance, MonoItem};
40+
use stable_mir::rustc_internal;
4141
use stable_mir::{CrateDef, DefId};
4242
use std::any::Any;
4343
use std::fs::File;

kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ use charon_lib::{error_assert, error_or_panic};
5656
use core::panic;
5757
use rustc_data_structures::fx::FxHashMap;
5858
use rustc_middle::ty::{TyCtxt, TypingEnv};
59-
use rustc_smir::rustc_internal;
6059
use stable_mir::mir::mono::{Instance, InstanceDef};
6160
use stable_mir::mir::{
6261
AggregateKind, BasicBlock, BinOp, Body, BorrowKind, CastKind, ConstOperand, Local, Mutability,
6362
Operand, Place, ProjectionElem, Rvalue, Statement, StatementKind, SwitchTargets, Terminator,
6463
TerminatorKind, UnOp, VarDebugInfoContents,
6564
};
65+
use stable_mir::rustc_internal;
6666
use stable_mir::ty::{
6767
AdtDef, AdtKind, Allocation, ConstantKind, FnDef, GenericArgKind, GenericArgs,
68-
GenericParamDefKind, IndexedVal, IntTy, MirConst, Region, RegionKind, RigidTy, Span, TraitDecl,
69-
TraitDef, Ty, TyConst, TyConstKind, TyKind, UintTy,
68+
GenericParamDefKind, IntTy, MirConst, Region, RegionKind, RigidTy, Span, TraitDecl, TraitDef,
69+
Ty, TyConst, TyConstKind, TyKind, UintTy,
7070
};
7171
use stable_mir::{CrateDef, CrateDefType, DefId};
7272
use std::collections::HashMap;

kani-compiler/src/codegen_cprover_gotoc/codegen/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use cbmc::goto_program::FunctionContract;
66
use cbmc::goto_program::{Expr, Lambda, Location, Type};
77
use kani_metadata::AssignsContract;
88
use rustc_hir::def_id::DefId as InternalDefId;
9-
use rustc_smir::rustc_internal;
109
use stable_mir::CrateDef;
1110
use stable_mir::mir::mono::{Instance, MonoItem};
1211
use stable_mir::mir::{Local, VarDebugInfoContents};
12+
use stable_mir::rustc_internal;
1313
use stable_mir::ty::{FnDef, RigidTy, TyKind};
1414

1515
impl GotocCtx<'_> {

kani-compiler/src/codegen_cprover_gotoc/codegen/function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ pub mod rustc_smir {
241241
use rustc_middle::mir::coverage::BasicCoverageBlock;
242242
use rustc_middle::mir::coverage::MappingKind::Code;
243243
use rustc_middle::ty::TyCtxt;
244-
use rustc_smir::rustc_internal;
245244
use stable_mir::mir::mono::Instance;
245+
use stable_mir::rustc_internal;
246246
use stable_mir::{Filename, Opaque};
247247

248248
type CoverageOpaque = stable_mir::Opaque;
@@ -285,7 +285,7 @@ pub mod rustc_smir {
285285
instance: Instance,
286286
) -> Option<(SourceRegion, Filename)> {
287287
// We need to pull the coverage info from the internal MIR instance.
288-
let instance_def = rustc_smir::rustc_internal::internal(tcx, instance.def.def_id());
288+
let instance_def = rustc_internal::internal(tcx, instance.def.def_id());
289289
let body = tcx.instance_mir(rustc_middle::ty::InstanceKind::Item(instance_def));
290290
let filename = rustc_internal::stable(body.span).get_filename();
291291
// Some functions, like `std` ones, may not have coverage info attached

kani-compiler/src/codegen_cprover_gotoc/codegen/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use crate::unwrap_or_return_codegen_unimplemented_stmt;
1010
use cbmc::goto_program::{BinaryOperator, BuiltinFn, Expr, Location, Stmt, Type};
1111
use rustc_middle::ty::TypingEnv;
1212
use rustc_middle::ty::layout::ValidityRequirement;
13-
use rustc_smir::rustc_internal;
1413
use stable_mir::mir::mono::Instance;
1514
use stable_mir::mir::{BasicBlockIdx, Operand, Place};
15+
use stable_mir::rustc_internal;
1616
use stable_mir::ty::{GenericArgs, RigidTy, Span, Ty, TyKind, UintTy};
1717
use tracing::debug;
1818

kani-compiler/src/codegen_cprover_gotoc/codegen/operand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use crate::kani_middle::is_anon_static;
66
use crate::unwrap_or_return_codegen_unimplemented;
77
use cbmc::goto_program::{DatatypeComponent, Expr, ExprValue, Location, Symbol, Type};
88
use rustc_middle::ty::Const as ConstInternal;
9-
use rustc_smir::rustc_internal;
109
use rustc_span::Span as SpanInternal;
1110
use stable_mir::mir::alloc::{AllocId, GlobalAlloc};
1211
use stable_mir::mir::mono::{Instance, StaticDef};
1312
use stable_mir::mir::{Mutability, Operand};
13+
use stable_mir::rustc_internal;
1414
use stable_mir::ty::{
1515
Allocation, ConstantKind, FloatTy, FnDef, GenericArgs, IntTy, MirConst, RigidTy, Size, Ty,
1616
TyConst, TyConstKind, TyKind, UintTy,

kani-compiler/src/codegen_cprover_gotoc/codegen/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use crate::unwrap_or_return_codegen_unimplemented;
1414
use cbmc::goto_program::{Expr, ExprValue, Location, Stmt, Type};
1515
use rustc_abi::{TagEncoding, Variants};
1616
use rustc_middle::ty::layout::LayoutOf;
17-
use rustc_smir::rustc_internal;
1817
use stable_mir::mir::{FieldIdx, Local, Mutability, Place, ProjectionElem};
18+
use stable_mir::rustc_internal;
1919
use stable_mir::ty::{RigidTy, Ty, TyKind, VariantDef, VariantIdx};
2020
use tracing::{debug, trace, warn};
2121

kani-compiler/src/codegen_cprover_gotoc/codegen/rvalue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ use cbmc::{InternString, InternedString, btree_string_map};
2020
use num::bigint::BigInt;
2121
use rustc_abi::{FieldsShape, TagEncoding, Variants};
2222
use rustc_middle::ty::{TyCtxt, TypingEnv, VtblEntry};
23-
use rustc_smir::rustc_internal;
2423
use stable_mir::abi::{Primitive, Scalar, ValueAbi};
2524
use stable_mir::mir::mono::Instance;
2625
use stable_mir::mir::{
2726
AggregateKind, BinOp, CastKind, NullOp, Operand, Place, PointerCoercion, Rvalue, UnOp,
2827
};
28+
use stable_mir::rustc_internal;
2929
use stable_mir::ty::{
3030
Binder, ClosureKind, ExistentialPredicate, IntTy, RigidTy, Size, Ty, TyConst, TyKind, UintTy,
3131
VariantIdx,

kani-compiler/src/codegen_cprover_gotoc/codegen/span.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use crate::codegen_cprover_gotoc::GotocCtx;
77
use cbmc::goto_program::Location;
88
use lazy_static::lazy_static;
99
use rustc_hir::Attribute;
10-
use rustc_smir::rustc_internal;
1110
use rustc_span::Span;
11+
use stable_mir::rustc_internal;
1212
use stable_mir::ty::Span as SpanStable;
1313
use std::collections::HashMap;
1414

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ use rustc_abi::Size;
1212
use rustc_abi::{FieldsShape, Primitive, TagEncoding, Variants};
1313
use rustc_middle::ty::layout::LayoutOf;
1414
use rustc_middle::ty::{List, TypingEnv};
15-
use rustc_smir::rustc_internal;
1615
use stable_mir::CrateDef;
1716
use stable_mir::abi::{ArgAbi, FnAbi, PassMode};
1817
use stable_mir::mir::mono::{Instance, InstanceKind};
1918
use stable_mir::mir::{
2019
AssertMessage, BasicBlockIdx, CopyNonOverlapping, NonDivergingIntrinsic, Operand, Place,
2120
RETURN_LOCAL, Rvalue, Statement, StatementKind, SwitchTargets, Terminator, TerminatorKind,
2221
};
22+
use stable_mir::rustc_internal;
2323
use stable_mir::ty::{Abi, RigidTy, Span, Ty, TyKind, VariantIdx};
2424
use tracing::{debug, debug_span, trace};
2525

0 commit comments

Comments
 (0)