-
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 lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in 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.
Description
Given the following code: play
const A: [_; 3] = [1u8, 2, 3];
The current output is:
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> src/lib.rs:1:10
|
1 | const A: [_; 3] = [1u8, 2, 3];
| ^^^^^^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `[u8; 3]`
Ideally the output should look like:
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> src/lib.rs:1:10
|
1 | const A: [_; 3] = [1u8, 2, 3];
| ^^^^^^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `u8`
@rustbot claim
@rustbot label D-incorrect D-invalid-suggestion
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in 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.