We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cf720b commit c1d9191Copy full SHA for c1d9191
src/libstd/thread/mod.rs
@@ -1485,9 +1485,10 @@ fn _assert_sync_and_send() {
1485
mod tests {
1486
use super::Builder;
1487
use crate::any::Any;
1488
+ use crate::mem;
1489
use crate::sync::mpsc::{channel, Sender};
1490
use crate::result;
- use crate::thread;
1491
+ use crate::thread::{self, ThreadId};
1492
use crate::time::Duration;
1493
use crate::u32;
1494
@@ -1717,6 +1718,11 @@ mod tests {
1717
1718
thread::sleep(Duration::from_millis(2));
1719
}
1720
1721
+ #[test]
1722
+ fn test_size_of_option_thread_id() {
1723
+ assert_eq!(mem::size_of::<Option<ThreadId>>(), mem::size_of::<ThreadId>());
1724
+ }
1725
+
1726
#[test]
1727
fn test_thread_id_equal() {
1728
assert!(thread::current().id() == thread::current().id());
0 commit comments