Generics
Angle brackets, Rust-aligned:
generic-params ::= '<' generic-param (',' …)* '>'
generic-param ::= Ident ('<:' TypeExpr ('+' TypeExpr)*)?
Type arguments at call site use turbofish for disambiguation: sort::<Money>(prices).
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Angle brackets, Rust-aligned:
generic-params ::= '<' generic-param (',' …)* '>'
generic-param ::= Ident ('<:' TypeExpr ('+' TypeExpr)*)?
Type arguments at call site use turbofish for disambiguation: sort::<Money>(prices).