Skip to content

Commit db1c5fe

Browse files
authored
Upgrade toolchain to 2024-12-09 (#3768)
Upgrade toolchain to 12/09. Culprit PRs: - rust-lang/rust#132410 - rust-lang/rust#133746 - Unnecessary `map_or` [clippy lint](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or) As with previous toolchain upgrades, it's unclear why the LLBC tests regressed. Resolves #3754 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 537ad8d commit db1c5fe

File tree

8 files changed

+28
-27
lines changed

8 files changed

+28
-27
lines changed

Diff for: kani-compiler/src/kani_compiler.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use clap::Parser;
2727
use rustc_codegen_ssa::traits::CodegenBackend;
2828
use rustc_driver::{Callbacks, Compilation, RunCompiler};
2929
use rustc_interface::Config;
30+
use rustc_middle::ty::TyCtxt;
3031
use rustc_session::config::ErrorOutputType;
3132
use rustc_smir::rustc_internal;
3233
use rustc_span::ErrorGuaranteed;
@@ -124,17 +125,15 @@ impl Callbacks for KaniCompiler {
124125
}
125126

126127
/// After analysis, we check the crate items for Kani API misuse or configuration issues.
127-
fn after_analysis<'tcx>(
128+
fn after_analysis(
128129
&mut self,
129130
_compiler: &rustc_interface::interface::Compiler,
130-
rustc_queries: &'tcx rustc_interface::Queries<'tcx>,
131+
tcx: TyCtxt<'_>,
131132
) -> Compilation {
132-
rustc_queries.global_ctxt().unwrap().enter(|tcx| {
133-
rustc_internal::run(tcx, || {
134-
check_crate_items(tcx, self.queries.lock().unwrap().args().ignore_global_asm);
135-
})
136-
.unwrap()
137-
});
133+
rustc_internal::run(tcx, || {
134+
check_crate_items(tcx, self.queries.lock().unwrap().args().ignore_global_asm);
135+
})
136+
.unwrap();
138137
Compilation::Continue
139138
}
140139
}

Diff for: kani-compiler/src/kani_middle/attributes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -673,12 +673,12 @@ fn expect_key_string_value(
673673
attr: &Attribute,
674674
) -> Result<rustc_span::Symbol, ErrorGuaranteed> {
675675
let span = attr.span;
676-
let AttrArgs::Eq(_, it) = &attr.get_normal_item().args else {
676+
let AttrArgs::Eq { eq_span: _, value } = &attr.get_normal_item().args else {
677677
return Err(sess
678678
.dcx()
679679
.span_err(span, "Expected attribute of the form #[attr = \"value\"]"));
680680
};
681-
let maybe_str = match it {
681+
let maybe_str = match value {
682682
AttrArgsEq::Ast(expr) => {
683683
if let ExprKind::Lit(tok) = expr.kind {
684684
match LitKind::from_token_lit(tok) {

Diff for: kani-driver/src/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl Project {
7676
trace!(?harness.goto_file, ?expected_path, ?typ, "get_harness_artifact");
7777
self.artifacts.iter().find(|artifact| {
7878
artifact.has_type(typ)
79-
&& expected_path.as_ref().map_or(true, |goto_file| *goto_file == artifact.path)
79+
&& expected_path.as_ref().is_none_or(|goto_file| *goto_file == artifact.path)
8080
})
8181
}
8282

Diff for: 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-2024-11-28"
5+
channel = "nightly-2024-12-09"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

Diff for: tests/expected/llbc/enum/expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn test::main()
2929
let i@2: i32; // local
3030

3131
e@1 := test::MyEnum::A { 0: const (1 : i32) }
32-
i@2 := @Fun1(move (e@1))
32+
i@2 := @Fun0(move (e@1))
3333
drop i@2
3434
@0 := ()
3535
return

Diff for: tests/expected/llbc/generic/expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn test::main()
4343

4444
@2 := core::option::Option::Some { 0: const (1 : i32) }
4545
@3 := core::option::Option::Some { 0: const (2 : i32) }
46-
e@1 := @Fun1(move (@2), move (@3))
46+
e@1 := @Fun0(move (@2), move (@3))
4747
drop @3
4848
drop @2
4949
drop e@1

Diff for: tests/expected/llbc/projection/expected

+14-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ struct test::MyStruct =
44
b: i32,
55
}
66
enum test::MyEnum0 =
7-
| A(0: @Adt0, 1: i32)
7+
| A(0: @Adt1, 1: i32)
88
| B()
99
enum test::MyEnum =
10-
| A(0: @Adt0, 1: @Adt2)
10+
| A(0: @Adt1, 1: @Adt2)
1111
| B(0: (i32, i32))
12-
fn test::enum_match(@1: @Adt1) -> i32
12+
13+
fn test::enum_match(@1: @Adt0) -> i32
1314
{
1415
let @0: i32; // return
15-
let e@1: @Adt1; // arg #1
16-
let s@2: @Adt0; // local
16+
let e@1: @Adt0; // arg #1
17+
let s@2: @Adt1; // local
1718
let e0@3: @Adt2; // local
18-
let s1@4: @Adt0; // local
19+
let s1@4: @Adt1; // local
1920
let b@5: i32; // local
2021
let @6: i32; // anonymous local
2122
let @7: i32; // anonymous local
@@ -59,17 +60,18 @@ fn test::enum_match(@1: @Adt1) -> i32
5960
fn test::main()
6061
{
6162
let @0: (); // return
62-
let s@1: @Adt0; // local
63-
let s0@2: @Adt0; // local
64-
let e@3: @Adt1; // local
63+
let s@1: @Adt1; // local
64+
let s0@2: @Adt1; // local
65+
let e@3: @Adt0; // local
6566
let @4: @Adt2; // anonymous local
6667
let i@5: i32; // local
67-
s@1 := @Adt0 { a: const (1 : i32), b: const (2 : i32) }
68-
s0@2 := @Adt0 { a: const (1 : i32), b: const (2 : i32) }
68+
s@1 := @Adt1 { a: const (1 : i32), b: const (2 : i32) }
69+
s0@2 := @Adt1 { a: const (1 : i32), b: const (2 : i32) }
70+
6971
@4 := test::MyEnum0::A { 0: move (s0@2), 1: const (1 : i32) }
7072
e@3 := test::MyEnum::A { 0: move (s@1), 1: move (@4) }
7173
drop @4
72-
i@5 := @Fun1(move (e@3))
74+
i@5 := @Fun0(move (e@3))
7375
drop i@5
7476
@0 := ()
7577
return

Diff for: tests/expected/llbc/tuple/expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn test::main()
2020
let @2: (i32, i32); // anonymous local
2121

2222
@2 := (const (1 : i32), const (2 : i32))
23-
s@1 := @Fun1(move (@2))
23+
s@1 := @Fun0(move (@2))
2424
drop @2
2525
drop s@1
2626
@0 := ()

0 commit comments

Comments
 (0)