-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Misleading section on angle-brackets for specializing traits in Generic functions
section
#26320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Isn't the text referring to
Those angle brackets? "following the function name" |
Yeah, I suspect the real confusion here is that the That said, the reference is explicitly not intended to be pedagogical, and implicitly not yet expected to be complete. |
In the reference.md in the section Generic functions it is stated that
(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 theFn
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.The text was updated successfully, but these errors were encountered: