]> git.lizzy.rs Git - rust.git/commitdiff
also test std::hint::spin_loop
authorRalf Jung <post@ralfj.de>
Sun, 3 May 2020 10:40:15 +0000 (12:40 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 3 May 2020 10:47:23 +0000 (12:47 +0200)
tests/run-pass/sync.rs

index a4fd6f584c5890b26dccfa914acbb4636fc75ba4..8b8594d4df69dc32a124f609e31c83dc5ba926bb 100644 (file)
@@ -1,7 +1,8 @@
-#![feature(rustc_private)]
+#![feature(rustc_private, renamed_spin_loop)]
 
 use std::sync::{Mutex, TryLockError};
 use std::sync::atomic;
+use std::hint;
 
 fn main() {
     test_mutex_stdlib();
@@ -56,6 +57,7 @@ fn would_block(&self) -> bool {
 
 fn test_spin_loop_hint() {
     atomic::spin_loop_hint();
+    hint::spin_loop();
 }
 
 fn test_thread_yield_now() {