-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-inconsistentDiagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.Diagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
type FOO = fn() -> _;
fn main() {}
produces (playground link):
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> src/main.rs:1:21
|
1 | type FOO = fn() -> _;
| ^
| |
| not allowed in type signatures
| help: use type parameters instead: `T`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> src/main.rs:1:21
|
1 | type FOO = fn() -> _;
| ^ not allowed in type signatures
error: aborting due to 2 previous errors
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-inconsistentDiagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.Diagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.