diff options
Diffstat (limited to 'embassy-sync/tests/ui/sync_impl/once_lock.rs')
| -rw-r--r-- | embassy-sync/tests/ui/sync_impl/once_lock.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-sync/tests/ui/sync_impl/once_lock.rs b/embassy-sync/tests/ui/sync_impl/once_lock.rs new file mode 100644 index 000000000..8f50d583b --- /dev/null +++ b/embassy-sync/tests/ui/sync_impl/once_lock.rs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | use embassy_sync::once_lock::OnceLock; | ||
| 2 | |||
| 3 | // *mut u8 is not Sync, so OnceLock should not implement Sync for this type. This should fail to compile. | ||
| 4 | static GLOBAL: OnceLock<*mut u8> = OnceLock::new(); | ||
| 5 | |||
| 6 | fn main() {} | ||
