Skip to content

Pluralise '1 type parameters' in errors #37042

Closed
@Wilfred

Description

@Wilfred

Given the code:

fn too_many_type_params() -> Option<i64, i64> {
    None
}

rustc reports:

error[E0244]: wrong number of type arguments
 --> <anon>:1:30
  |
1 | fn too_many_type_params() -> Option<i64, i64> {
  |                              ^^^^^^^^^^^^^^^^ expected 1 type arguments, found 2

Ideally error messages would use correct plurals, so 'expected 1 type argument, found 2' in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions