Converts a potentially non-`Sync` allocator into a `Sync` one by assuming it will only be used by one thread. # Safety The caller must ensure that the returned value is only accessed by a single thread.
(t: T)
| 14 | /// |
| 15 | /// The caller must ensure that the returned value is only accessed by a single thread. |
| 16 | pub const unsafe fn new(t: T) -> Self { |
| 17 | AssumeSingleThreaded { inner: t } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | /// This is an invalid implementation of Sync. |
nothing calls this directly
no outgoing calls
no test coverage detected