Skip to content

Commit 37b9043

Browse files
committed
move tests to tests/sync/nonpoison/
1 parent fe63b90 commit 37b9043

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

library/std/src/sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ pub use self::poison::{MappedMutexGuard, MappedRwLockReadGuard, MappedRwLockWrit
224224
#[unstable(feature = "mpmc_channel", issue = "126840")]
225225
pub mod mpmc;
226226
pub mod mpsc;
227+
227228
#[unstable(feature = "sync_nonpoison", issue = "134645")]
228229
pub mod nonpoison;
229-
230230
#[unstable(feature = "sync_poison_mod", issue = "134646")]
231231
pub mod poison;
232232

library/std/src/sync/nonpoison/mutex.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[cfg(all(test, not(any(target_os = "emscripten", target_os = "wasi"))))]
2-
mod tests;
3-
41
use crate::cell::UnsafeCell;
52
use crate::fmt;
63
use crate::marker::PhantomData;

library/std/tests/sync/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#![feature(reentrant_lock)]
77
#![feature(rwlock_downgrade)]
88
#![feature(std_internals)]
9+
#![feature(sync_nonpoison)]
10+
#![feature(nonpoison_mutex)]
911
#![allow(internal_features)]
1012

1113
mod barrier;
@@ -20,6 +22,7 @@ mod once_lock;
2022
#[cfg(not(any(target_os = "emscripten", target_os = "wasi")))]
2123
mod reentrant_lock;
2224

25+
mod nonpoison;
2326
mod poison;
2427

2528
#[path = "../common/mod.rs"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[cfg(not(any(target_os = "emscripten", target_os = "wasi")))]
2+
mod mutex;

library/std/src/sync/nonpoison/mutex/tests.rs renamed to library/std/tests/sync/nonpoison/mutex.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use crate::fmt::Debug;
2-
use crate::sync::Arc;
3-
use crate::sync::atomic::{AtomicUsize, Ordering};
4-
use crate::sync::mpsc::channel;
5-
use crate::sync::nonpoison::{MappedMutexGuard, Mutex, MutexGuard};
6-
use crate::{hint, mem, thread};
1+
use std::fmt::Debug;
2+
use std::sync::Arc;
3+
use std::sync::atomic::{AtomicUsize, Ordering};
4+
use std::sync::mpsc::channel;
5+
use std::sync::nonpoison::{MappedMutexGuard, Mutex, MutexGuard};
6+
use std::{hint, mem, thread};
77

88
#[derive(Eq, PartialEq, Debug)]
99
struct NonCopy(i32);

0 commit comments

Comments
 (0)