diff --git a/rust-version b/rust-version index 81fe678f1172..be7b603f9054 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -0a675c5e02e6ecfda7d4e04aabd23a9935e0c4bf +ff4df04799c406c8149a041c3163321758aac924 diff --git a/src/shims/foreign_items/windows.rs b/src/shims/foreign_items/windows.rs index a58444b21bff..f55b5b8450e0 100644 --- a/src/shims/foreign_items/windows.rs +++ b/src/shims/foreign_items/windows.rs @@ -236,12 +236,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx | "LeaveCriticalSection" | "DeleteCriticalSection" if this.frame().instance.to_string().starts_with("std::sys::windows::") => { + assert_eq!(this.get_total_thread_count()?, 1, "concurrency on Windows not supported"); // Nothing to do, not even a return value. // (Windows locks are reentrant, and we have only 1 thread, // so not doing any futher checks here is at least not incorrect.) } "TryEnterCriticalSection" if this.frame().instance.to_string().starts_with("std::sys::windows::") => { + assert_eq!(this.get_total_thread_count()?, 1, "concurrency on Windows not supported"); // There is only one thread, so this always succeeds and returns TRUE this.write_scalar(Scalar::from_i32(1), dest)?; } diff --git a/tests/run-pass/sync.rs b/tests/run-pass/sync_singlethread.rs similarity index 100% rename from tests/run-pass/sync.rs rename to tests/run-pass/sync_singlethread.rs