And... how would that be possible at compile time?
And if you want it to be optional, like "if mainthread", then just accept an Option of MainThread.
In fact I see exactly this is proposed in the comments on the article: https://users.rust-lang.org/t/my-gamedever-wishlist-for-rust...