Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustSend and Sync auto traitsSingle-choice MCQ

`Send` and `Sync` are auto traits, so the compiler derives them structurally. But auto-trait propagation interacts with variance markers. Why is `PhantomData<*const T>` enough to make a wrapper struct `!Send` and `!Sync` regardless of `T`?

struct Token<T> { _marker: std::marker::PhantomData<*const T>, }