Skip to content

Misleading section on angle-brackets for specializing traits in Generic functions section #26320

Closed
@simendsjo

Description

@simendsjo

In the reference.md in the section Generic functions it is stated that

Each type parameter must be explicitly declared, in an angle-bracket-enclosed, comma-separated list following the function name.

(emphasis mine)

But the example shows a type parameter on Fn, which requires parenthesis-enclosed type parameters rather than angle-brackets. geofft mentioned on IRC that this might be some special case to open the possibility to easier change the Fn traits at a later time (if I understood correctly), but I found it confusing to see a specialization using parenthesis without ever having heard they existed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions