-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.