diff options
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/mem.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcore/tests/mem.rs b/src/libcore/tests/mem.rs index 86e59c736ba..f55a1c81463 100644 --- a/src/libcore/tests/mem.rs +++ b/src/libcore/tests/mem.rs @@ -121,3 +121,19 @@ fn test_transmute() { } } +#[test] +#[allow(dead_code)] +fn test_discriminant_send_sync() { + enum Regular { + A, + B(i32) + } + enum NotSendSync { + A(*const i32) + } + + fn is_send_sync<T: Send + Sync>() { } + + is_send_sync::<Discriminant<Regular>>(); + is_send_sync::<Discriminant<NotSendSync>>(); +} |
