error[E0277]: `*const ()` cannot be sent between threads safely --> tests/ui/send-sync-ub.rs:17:5 | 17 | thread::spawn(|| { | ^^^^^^^^^^^^^ -- within this `[closure@$DIR/tests/ui/send-sync-ub.rs:17:19: 17:21]` | | | `*const ()` cannot be sent between threads safely | = help: within `[closure@$DIR/tests/ui/send-sync-ub.rs:17:19: 17:21]`, the trait `std::marker::Send` is not implemented for `*const ()` = note: required because it appears within the type `PhantomData<*const ()>` = note: required because it appears within the type `Markers` note: required because it appears within the type `_foo_impl::Foo<'_>` --> tests/ui/send-sync-ub.rs:7:11 | 7 | #[name_it(Foo)] | ^^^ = note: required because it appears within the type `Named<_foo_impl::Foo<'_>>` note: required because it's used within this closure --> tests/ui/send-sync-ub.rs:17:19 | 17 | thread::spawn(|| { | ^^ note: required by a bound in `std::thread::spawn` --> $RUST/std/src/thread/mod.rs | | F: Send + 'static, | ^^^^ required by this bound in `std::thread::spawn`