diff --git a/src/identifier.rs b/src/identifier.rs index 820f5d47..170a4e05 100644 --- a/src/identifier.rs +++ b/src/identifier.rs @@ -249,6 +249,9 @@ impl PartialEq for Identifier { } } +unsafe impl Send for Identifier {} +unsafe impl Sync for Identifier {} + // We use heap pointers that are 2-byte aligned, meaning they have an // insignificant 0 in the least significant bit. We take advantage of that // unneeded bit to rotate a 1 into the most significant bit to make the repr diff --git a/tests/test_autotrait.rs b/tests/test_autotrait.rs new file mode 100644 index 00000000..af8534bd --- /dev/null +++ b/tests/test_autotrait.rs @@ -0,0 +1,12 @@ +fn assert_send_sync() {} + +#[test] +fn test() { + assert_send_sync::(); + assert_send_sync::(); + assert_send_sync::(); + assert_send_sync::(); + assert_send_sync::(); + assert_send_sync::(); + assert_send_sync::(); +}