use ghost::phantom; #[phantom] struct MyPhantom; fn require_send() {} fn require_sync() {} fn main() { // ok require_send::>(); require_sync::>(); // not ok require_send::>(); require_sync::>(); }