As per #85487 (comment), using both #[global_allocator] and #[thread_local] is currently allowed but should not be since the Global allocator is always Sync + Send which means that even if the type implementing GlobalAlloc is neither, allocations using the default Global allocator can be sent between threads which is unsound as they would be deallocated in a different allocator.
As per #85487 (comment), using both
#[global_allocator]and#[thread_local]is currently allowed but should not be since theGlobalallocator is alwaysSync + Sendwhich means that even if the type implementingGlobalAllocis neither, allocations using the defaultGlobalallocator can be sent between threads which is unsound as they would be deallocated in a different allocator.