Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Rust toolchain to nightly-2024-02-09 #3015

Merged
merged 8 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ dependencies = [

[[package]]
name = "ahash"
version = "0.7.8"
version = "0.8.7"
feliperodri marked this conversation as resolved.
Show resolved Hide resolved
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
dependencies = [
"getrandom",
"cfg-if",
"once_cell",
"version_check",
"zerocopy",
]

[[package]]
Expand Down Expand Up @@ -378,19 +379,13 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"

[[package]]
name = "hashbrown"
version = "0.11.2"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
"ahash",
]

[[package]]
name = "hashbrown"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"

[[package]]
name = "heck"
version = "0.4.1"
Expand All @@ -413,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
dependencies = [
"equivalent",
"hashbrown 0.14.3",
"hashbrown",
]

[[package]]
Expand Down Expand Up @@ -1046,12 +1041,12 @@ dependencies = [

[[package]]
name = "string-interner"
version = "0.14.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e2531d8525b29b514d25e275a43581320d587b86db302b9a7e464bac579648"
checksum = "07f9fdfdd31a0ff38b59deb401be81b73913d76c9cc5b1aed4e1330a223420b9"
dependencies = [
"cfg-if",
"hashbrown 0.11.2",
"hashbrown",
"serde",
]

Expand Down Expand Up @@ -1516,3 +1511,23 @@ checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29"
dependencies = [
"memchr",
]

[[package]]
name = "zerocopy"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
dependencies = [
"zerocopy-derive",
]

[[package]]
name = "zerocopy-derive"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
]
2 changes: 1 addition & 1 deletion cprover_bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy_static = "1.4.0"
num = "0.4.0"
num-traits = "0.2"
serde = {version = "1", features = ["derive"]}
string-interner = "0.14.0"
string-interner = "0.15.0"
tracing = "0.1"
linear-map = {version = "1.2", features = ["serde_impl"]}

Expand Down
4 changes: 3 additions & 1 deletion cprover_bindings/src/cbmc_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use lazy_static::lazy_static;
use std::sync::Mutex;
use string_interner::backend::StringBackend;
use string_interner::symbol::SymbolU32;
use string_interner::StringInterner;

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

// Use a `Mutex` to make this thread safe.
lazy_static! {
static ref INTERNER: Mutex<StringInterner> = Mutex::new(StringInterner::default());
static ref INTERNER: Mutex<StringInterner<StringBackend>> =
Mutex::new(StringInterner::default());
}

impl InternedString {
Expand Down
9 changes: 8 additions & 1 deletion kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl TypeExt for Type {
}
}

#[allow(unused)]
fn is_unit_pointer(&self) -> bool {
match self {
Type::Pointer { typ } => typ.is_unit(),
Expand All @@ -108,6 +109,7 @@ impl TypeExt for Type {
}
}

#[allow(unused)]
feliperodri marked this conversation as resolved.
Show resolved Hide resolved
trait ExprExt {
fn unit(symbol_table: &SymbolTable) -> Self;

Expand Down Expand Up @@ -640,7 +642,11 @@ impl<'tcx> GotocCtx<'tcx> {
ty::Bound(_, _) | ty::Param(_) => unreachable!("monomorphization bug"),

// type checking remnants which shouldn't be reachable
ty::CoroutineWitness(_, _) | ty::Infer(_) | ty::Placeholder(_) | ty::Error(_) => {
ty::CoroutineWitness(_, _)
| ty::CoroutineClosure(_, _)
| ty::Infer(_)
| ty::Placeholder(_)
| ty::Error(_) => {
unreachable!("remnants of type checking")
}
}
Expand Down Expand Up @@ -1078,6 +1084,7 @@ impl<'tcx> GotocCtx<'tcx> {
ty::Bound(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::Error(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::CoroutineWitness(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::CoroutineClosure(_, _) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::Infer(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::Param(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
ty::Placeholder(_) => todo!("{:?} {:?}", pointee_type, pointee_type.kind()),
Expand Down
2 changes: 1 addition & 1 deletion kani-compiler/src/kani_middle/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ fn custom_coerce_unsize_info<'tcx>(

match tcx.codegen_select_candidate((ParamEnv::reveal_all(), trait_ref)) {
Ok(ImplSource::UserDefined(ImplSourceUserDefinedData { impl_def_id, .. })) => {
tcx.coerce_unsized_info(impl_def_id).custom_kind.unwrap()
tcx.coerce_unsized_info(impl_def_id).unwrap().custom_kind.unwrap()
}
impl_source => {
unreachable!("invalid `CoerceUnsized` impl_source: {:?}", impl_source);
Expand Down
2 changes: 1 addition & 1 deletion kani-compiler/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static JSON_PANIC_HOOK: LazyLock<Box<dyn Fn(&panic::PanicInfo<'_>) + Sync + Send
TerminalUrl::No,
);
let diagnostic = Diagnostic::new(rustc_errors::Level::Bug, msg);
emitter.emit_diagnostic(&diagnostic);
emitter.emit_diagnostic(diagnostic);
(*JSON_PANIC_HOOK)(info);
}));
hook
Expand Down
1 change: 1 addition & 0 deletions kani-driver/src/args/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub trait Verbosity {
/// Note that `debug() == true` must imply `verbose() == true`.
fn verbose(&self) -> bool;
/// Whether we should emit debug messages.
#[allow(unused)]
fn debug(&self) -> bool;
feliperodri marked this conversation as resolved.
Show resolved Hide resolved
/// Whether any verbosity was selected.
fn is_set(&self) -> bool;
Expand Down
1 change: 0 additions & 1 deletion kani-driver/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
#![feature(let_chains)]
#![feature(array_methods)]
use std::ffi::OsString;
use std::process::ExitCode;

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-01-25"
channel = "nightly-2024-02-09"
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
7 changes: 3 additions & 4 deletions tests/ui/derive-arbitrary/non_arbitrary_param/expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
error[E0277]: the trait bound `Void: kani::Arbitrary` is not satisfied
feliperodri marked this conversation as resolved.
Show resolved Hide resolved

|\
| let _wrapper: Wrapper<Void> = kani::any();\
| ^^^^^^^^^ the trait `kani::Arbitrary` is not implemented for `Void`\
|\
14 | let _wrapper: Wrapper<Void> = kani::any();\
| ^^^^^^^^^^^ the trait `kani::Arbitrary` is not implemented for `Void`, which is required by `Wrapper<Void>: kani::Arbitrary`\
1 change: 0 additions & 1 deletion tools/bookrunner/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
html_playground_url = "https://play.rust-lang.org/"
)]
#![feature(rustc_private)]
#![feature(array_methods)]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
Expand Down
Loading