Skip to content

Commit 17ff02c

Browse files
authored
Upgrade Rust toolchain to nightly-2024-02-09 (#3015)
Attempt to update Rust toolchain from nightly-2024-01-25 to nightly-2024-02-09. Resolves #3014. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Signed-off-by: Felipe R. Monteiro <[email protected]>
1 parent 42fcf40 commit 17ff02c

File tree

11 files changed

+47
-66
lines changed

11 files changed

+47
-66
lines changed

Cargo.lock

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ dependencies = [
1414

1515
[[package]]
1616
name = "ahash"
17-
version = "0.7.8"
17+
version = "0.8.7"
1818
source = "registry+https://github.com/rust-lang/crates.io-index"
19-
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
19+
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
2020
dependencies = [
21-
"getrandom",
21+
"cfg-if",
2222
"once_cell",
2323
"version_check",
24+
"zerocopy",
2425
]
2526

2627
[[package]]
@@ -378,19 +379,13 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
378379

379380
[[package]]
380381
name = "hashbrown"
381-
version = "0.11.2"
382+
version = "0.14.3"
382383
source = "registry+https://github.com/rust-lang/crates.io-index"
383-
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
384+
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
384385
dependencies = [
385386
"ahash",
386387
]
387388

388-
[[package]]
389-
name = "hashbrown"
390-
version = "0.14.3"
391-
source = "registry+https://github.com/rust-lang/crates.io-index"
392-
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
393-
394389
[[package]]
395390
name = "heck"
396391
version = "0.4.1"
@@ -413,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
413408
checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
414409
dependencies = [
415410
"equivalent",
416-
"hashbrown 0.14.3",
411+
"hashbrown",
417412
]
418413

419414
[[package]]
@@ -1046,12 +1041,12 @@ dependencies = [
10461041

10471042
[[package]]
10481043
name = "string-interner"
1049-
version = "0.14.0"
1044+
version = "0.15.0"
10501045
source = "registry+https://github.com/rust-lang/crates.io-index"
1051-
checksum = "91e2531d8525b29b514d25e275a43581320d587b86db302b9a7e464bac579648"
1046+
checksum = "07f9fdfdd31a0ff38b59deb401be81b73913d76c9cc5b1aed4e1330a223420b9"
10521047
dependencies = [
10531048
"cfg-if",
1054-
"hashbrown 0.11.2",
1049+
"hashbrown",
10551050
"serde",
10561051
]
10571052

@@ -1516,3 +1511,23 @@ checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29"
15161511
dependencies = [
15171512
"memchr",
15181513
]
1514+
1515+
[[package]]
1516+
name = "zerocopy"
1517+
version = "0.7.32"
1518+
source = "registry+https://github.com/rust-lang/crates.io-index"
1519+
checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
1520+
dependencies = [
1521+
"zerocopy-derive",
1522+
]
1523+
1524+
[[package]]
1525+
name = "zerocopy-derive"
1526+
version = "0.7.32"
1527+
source = "registry+https://github.com/rust-lang/crates.io-index"
1528+
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
1529+
dependencies = [
1530+
"proc-macro2",
1531+
"quote",
1532+
"syn 2.0.48",
1533+
]

cprover_bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lazy_static = "1.4.0"
1717
num = "0.4.0"
1818
num-traits = "0.2"
1919
serde = {version = "1", features = ["derive"]}
20-
string-interner = "0.14.0"
20+
string-interner = "0.15.0"
2121
tracing = "0.1"
2222
linear-map = {version = "1.2", features = ["serde_impl"]}
2323

cprover_bindings/src/cbmc_string.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use lazy_static::lazy_static;
55
use std::sync::Mutex;
6+
use string_interner::backend::StringBackend;
67
use string_interner::symbol::SymbolU32;
78
use string_interner::StringInterner;
89

@@ -24,7 +25,8 @@ pub struct InternedString(SymbolU32);
2425

2526
// Use a `Mutex` to make this thread safe.
2627
lazy_static! {
27-
static ref INTERNER: Mutex<StringInterner> = Mutex::new(StringInterner::default());
28+
static ref INTERNER: Mutex<StringInterner<StringBackend>> =
29+
Mutex::new(StringInterner::default());
2830
}
2931

3032
impl InternedString {

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

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright Kani Contributors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33
use crate::codegen_cprover_gotoc::GotocCtx;
4-
use cbmc::btree_map;
54
use cbmc::goto_program::{DatatypeComponent, Expr, Location, Parameter, Symbol, SymbolTable, Type};
65
use cbmc::utils::aggr_tag;
76
use cbmc::{InternString, InternedString};
@@ -51,8 +50,6 @@ pub trait TypeExt {
5150
fn is_rust_fat_ptr(&self, st: &SymbolTable) -> bool;
5251
fn is_rust_slice_fat_ptr(&self, st: &SymbolTable) -> bool;
5352
fn is_rust_trait_fat_ptr(&self, st: &SymbolTable) -> bool;
54-
fn is_unit(&self) -> bool;
55-
fn is_unit_pointer(&self) -> bool;
5653
fn unit() -> Self;
5754
}
5855

@@ -92,42 +89,6 @@ impl TypeExt for Type {
9289
// We don't have access to the symbol table here to do it ourselves.
9390
Type::struct_tag(UNIT_TYPE_EMPTY_STRUCT_NAME)
9491
}
95-
96-
fn is_unit(&self) -> bool {
97-
match self {
98-
Type::StructTag(name) => *name == aggr_tag(UNIT_TYPE_EMPTY_STRUCT_NAME),
99-
_ => false,
100-
}
101-
}
102-
103-
fn is_unit_pointer(&self) -> bool {
104-
match self {
105-
Type::Pointer { typ } => typ.is_unit(),
106-
_ => false,
107-
}
108-
}
109-
}
110-
111-
trait ExprExt {
112-
fn unit(symbol_table: &SymbolTable) -> Self;
113-
114-
fn is_unit(&self) -> bool;
115-
116-
fn is_unit_pointer(&self) -> bool;
117-
}
118-
119-
impl ExprExt for Expr {
120-
fn unit(symbol_table: &SymbolTable) -> Self {
121-
Expr::struct_expr(Type::unit(), btree_map![], symbol_table)
122-
}
123-
124-
fn is_unit(&self) -> bool {
125-
self.typ().is_unit()
126-
}
127-
128-
fn is_unit_pointer(&self) -> bool {
129-
self.typ().is_unit_pointer()
130-
}
13192
}
13293

13394
/// Function signatures
@@ -640,7 +601,11 @@ impl<'tcx> GotocCtx<'tcx> {
640601
ty::Bound(_, _) | ty::Param(_) => unreachable!("monomorphization bug"),
641602

642603
// type checking remnants which shouldn't be reachable
643-
ty::CoroutineWitness(_, _) | ty::Infer(_) | ty::Placeholder(_) | ty::Error(_) => {
604+
ty::CoroutineWitness(_, _)
605+
| ty::CoroutineClosure(_, _)
606+
| ty::Infer(_)
607+
| ty::Placeholder(_)
608+
| ty::Error(_) => {
644609
unreachable!("remnants of type checking")
645610
}
646611
}
@@ -1078,6 +1043,7 @@ impl<'tcx> GotocCtx<'tcx> {
10781043
ty::Bound(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
10791044
ty::Error(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
10801045
ty::CoroutineWitness(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
1046+
ty::CoroutineClosure(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
10811047
ty::Infer(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
10821048
ty::Param(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
10831049
ty::Placeholder(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),

kani-compiler/src/kani_middle/coercion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ fn custom_coerce_unsize_info<'tcx>(
253253

254254
match tcx.codegen_select_candidate((ParamEnv::reveal_all(), trait_ref)) {
255255
Ok(ImplSource::UserDefined(ImplSourceUserDefinedData { impl_def_id, .. })) => {
256-
tcx.coerce_unsized_info(impl_def_id).custom_kind.unwrap()
256+
tcx.coerce_unsized_info(impl_def_id).unwrap().custom_kind.unwrap()
257257
}
258258
impl_source => {
259259
unreachable!("invalid `CoerceUnsized` impl_source: {:?}", impl_source);

kani-compiler/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static JSON_PANIC_HOOK: LazyLock<Box<dyn Fn(&panic::PanicInfo<'_>) + Sync + Send
6060
TerminalUrl::No,
6161
);
6262
let diagnostic = Diagnostic::new(rustc_errors::Level::Bug, msg);
63-
emitter.emit_diagnostic(&diagnostic);
63+
emitter.emit_diagnostic(diagnostic);
6464
(*JSON_PANIC_HOOK)(info);
6565
}));
6666
hook

kani-driver/src/args/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub trait Verbosity {
5151
/// Note that `debug() == true` must imply `verbose() == true`.
5252
fn verbose(&self) -> bool;
5353
/// Whether we should emit debug messages.
54+
#[allow(unused)]
5455
fn debug(&self) -> bool;
5556
/// Whether any verbosity was selected.
5657
fn is_set(&self) -> bool;

kani-driver/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright Kani Contributors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33
#![feature(let_chains)]
4-
#![feature(array_methods)]
54
use std::ffi::OsString;
65
use std::process::ExitCode;
76

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
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-01-25"
5+
channel = "nightly-2024-02-09"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
error[E0277]: the trait bound `Void: kani::Arbitrary` is not satisfied
2-
3-
|\
4-
| let _wrapper: Wrapper<Void> = kani::any();\
5-
| ^^^^^^^^^ the trait `kani::Arbitrary` is not implemented for `Void`\
2+
|\
3+
14 | let _wrapper: Wrapper<Void> = kani::any();\
4+
| ^^^^^^^^^^^ the trait `kani::Arbitrary` is not implemented for `Void`, which is required by `Wrapper<Void>: kani::Arbitrary`\

0 commit comments

Comments
 (0)