Closed
Description
struct Foo<T>(T, *const ());
unsafe impl Send for Foo<T> {}
results in
error[E0412]: cannot find type `T` in this scope
--> src/lib.rs:3:26
|
3 | unsafe impl Send for Foo<T> {}
| ^ not found in this scope
error[E0277]: `*const ()` cannot be sent between threads safely
--> src/lib.rs:3:13
|
3 | unsafe impl Send for Foo<T> {}
| ^^^^ `*const ()` cannot be sent between threads safely
|
= help: within `Foo<[type error]>`, the trait `std::marker::Send` is not implemented for `*const ()`
= note: required because it appears within the type `Foo<[type error]>`
The second error is incorrect and quite confusing.