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

Update the rust toolchain to nightly-2023-12-03 #2913

Merged
merged 17 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ use rustc_data_structures::temp_dir::MaybeTempDir;
use rustc_errors::{ErrorGuaranteed, DEFAULT_LOCALE_RESOURCE};
use rustc_hir::def_id::LOCAL_CRATE;
use rustc_hir::definitions::DefPathHash;
use rustc_metadata::creader::MetadataLoaderDyn;
use rustc_metadata::fs::{emit_wrapper_file, METADATA_FILENAME};
use rustc_metadata::EncodedMetadata;
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
use rustc_middle::mir::mono::MonoItem;
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
use rustc_session::config::{CrateType, OutputFilenames, OutputType};
use rustc_session::cstore::MetadataLoaderDyn;
use rustc_session::output::out_filename;
use rustc_session::Session;
use rustc_smir::rustc_internal;
Expand Down
1 change: 0 additions & 1 deletion kani-compiler/src/kani_middle/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ impl From<&Terminator> for Key {
TerminatorKind::Assert { .. } => Key("Assert"),
TerminatorKind::Call { .. } => Key("Call"),
TerminatorKind::Drop { .. } => Key("Drop"),
TerminatorKind::CoroutineDrop => Key("CoroutineDrop"),
TerminatorKind::Goto { .. } => Key("Goto"),
TerminatorKind::InlineAsm { .. } => Key("InlineAsm"),
TerminatorKind::Resume { .. } => Key("Resume"),
Expand Down
5 changes: 2 additions & 3 deletions kani-compiler/src/kani_middle/reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl<'a, 'tcx> MonoItemsFnCollector<'a, 'tcx> {
/// Collect an instance depending on how it is used (invoked directly or via fn_ptr).
fn collect_instance(&mut self, instance: Instance, is_direct_call: bool) {
let should_collect = match instance.kind {
InstanceKind::Virtual | InstanceKind::Intrinsic => {
InstanceKind::Virtual { .. } | InstanceKind::Intrinsic => {
// Instance definition has no body.
assert!(is_direct_call, "Expected direct call {instance:?}");
false
Expand Down Expand Up @@ -453,8 +453,7 @@ impl<'a, 'tcx> MirVisitor for MonoItemsFnCollector<'a, 'tcx> {
TerminatorKind::Abort { .. } | TerminatorKind::Assert { .. } => {
// We generate code for this without invoking any lang item.
}
TerminatorKind::CoroutineDrop { .. }
| TerminatorKind::Goto { .. }
TerminatorKind::Goto { .. }
| TerminatorKind::SwitchInt { .. }
| TerminatorKind::Resume
| TerminatorKind::Return
Expand Down
2 changes: 1 addition & 1 deletion kani-driver/src/concrete_playback/test_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl KaniSession {
let mut curr_line_num = 0;

// Use a buffered reader/writer to generate the unit test line by line
for line in source_reader.lines().flatten() {
for line in source_reader.lines().map_while(Result::ok) {
curr_line_num += 1;
writeln!(temp_file, "{line}")?;
if curr_line_num == proof_harness_end_line {
Expand Down
14 changes: 0 additions & 14 deletions library/kani/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,6 @@ mod test {
check_bitmask::<_, [u8; 9], i128, 70>(CustomMask([-1i128; 70]));
}

/// Compare the value returned by our model and the portable simd representation.
fn check_portable_bitmask<T, E, const LANES: usize>(mask: T)
where
T: ToBitMask + Clone,
tautschnig marked this conversation as resolved.
Show resolved Hide resolved
T::BitMask: Debug + PartialEq,
E: kani_intrinsic::MaskElement,
[u8; kani_intrinsic::mask_len(LANES)]: Sized,
{
assert_eq!(
unsafe { kani_intrinsic::simd_bitmask::<_, T::BitMask, E, LANES>(mask.clone()) },
mask.to_bitmask()
);
}

/// Compare the value returned by our model and the simd_bitmask intrinsic.
fn check_bitmask<T, U, E, const LANES: usize>(mask: T)
where
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-2023-12-01"
channel = "nightly-2023-12-03"
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
2 changes: 1 addition & 1 deletion tests/kani/SIMD/portable_simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Ensure we have basic support of portable SIMD.
#![feature(portable_simd)]

use std::simd::{mask32x4, u64x16, ToBitMask};
use std::simd::{mask32x4, u64x16};

#[kani::proof]
fn check_sum_any() {
Expand Down
Loading