-
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 lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-lack-of-suggestionDiagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.Diagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.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
Code
struct Simd<T, const N: usize>([T; N]);
fn into_array<T, const N: usize>(v: Simd<T, N>) -> [T, N] {
todo!()
}
Current output
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `,`
--> src/lib.rs:3:54
|
3 | fn into_array<T, const N: usize>(v: Simd<T, N>) -> [T, N] {
| ^ expected one of 7 possible tokens
Desired output
Something noting that I probably meant to write `[T; N]` there.
Rationale and extra context
No response
Other cases
Rust Version
Nightly version: 1.90.0-nightly
(2025-07-11 855e0fe46e68d94e9f61)
Anything else?
lieuwex
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-lack-of-suggestionDiagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.Diagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.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.