Skip to content

Commit ad996ac

Browse files
authored
Upgrade toolchain to nightly-2025-03-07 (#3931)
Changes required due to - rust-lang/rust#138026: Make CrateItem::body() function return an option - rust-lang/rust#137728: Remove unsizing coercions for tuples Resolves: #3930 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 b032310 commit ad996ac

File tree

4 files changed

+7
-25
lines changed

4 files changed

+7
-25
lines changed

kani-compiler/src/kani_middle/stubbing/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub fn validate_stub_const(tcx: TyCtxt, instance: Instance) -> bool {
130130
let item = CrateItem::try_from(instance).unwrap();
131131
let internal_instance = rustc_internal::internal(tcx, instance);
132132
let mut checker = StubConstChecker::new(tcx, internal_instance, item);
133-
checker.visit_body(&item.body());
133+
checker.visit_body(&item.expect_body());
134134
checker.is_valid()
135135
}
136136

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2025-03-05"
5+
channel = "nightly-2025-03-07"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

tests/kani/SizeAndAlignOfDst/unsized_tuple.rs

-18
This file was deleted.

tools/scanner/src/analysis.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl OverallStats {
138138
if !kind.is_fn() {
139139
return None;
140140
};
141-
let unsafe_ops = FnUnsafeOperations::new(item.name()).collect(&item.body());
141+
let unsafe_ops = FnUnsafeOperations::new(item.name()).collect(&item.expect_body());
142142
let fn_sig = kind.fn_sig().unwrap();
143143
let is_unsafe = fn_sig.skip_binder().safety == Safety::Unsafe;
144144
self.fn_stats.get_mut(&item).unwrap().has_unsafe_ops =
@@ -167,7 +167,7 @@ impl OverallStats {
167167
if !kind.is_fn() {
168168
return None;
169169
};
170-
Some(FnLoops::new(item.name()).collect(&item.body()))
170+
Some(FnLoops::new(item.name()).collect(&item.expect_body()))
171171
})
172172
.partition::<Vec<_>, _>(|props| props.has_loops());
173173

@@ -179,7 +179,7 @@ impl OverallStats {
179179
if !kind.is_fn() {
180180
return None;
181181
};
182-
Some(FnLoops::new(item.name()).collect(&item.body()))
182+
Some(FnLoops::new(item.name()).collect(&item.expect_body()))
183183
})
184184
.partition::<Vec<_>, _>(|props| props.has_iterators());
185185

@@ -190,7 +190,7 @@ impl OverallStats {
190190
if !kind.is_fn() {
191191
return None;
192192
};
193-
let fn_props = FnLoops::new(item.name()).collect(&item.body());
193+
let fn_props = FnLoops::new(item.name()).collect(&item.expect_body());
194194
self.fn_stats.get_mut(&item).unwrap().has_loop_or_iterator =
195195
Some(fn_props.has_iterators() || fn_props.has_loops());
196196
Some(fn_props)
@@ -601,7 +601,7 @@ impl Recursion {
601601
.into_iter()
602602
.filter_map(|item| {
603603
if let TyKind::RigidTy(RigidTy::FnDef(def, _)) = item.ty().kind() {
604-
let body = item.body();
604+
let body = item.expect_body();
605605
let mut visitor = FnCallVisitor { body: &body, fns: vec![] };
606606
visitor.visit_body(&body);
607607
Some((def, visitor.fns))

0 commit comments

Comments
 (0)