Summary
Generic parameter lists are skipped to the balanced <…> (maybe_generic_params) and not stored in the AST, so fn f<T: Bound>(), struct S<T>, etc. lose their type parameters. Bounds and where-clauses (maybe_where_clause) are likewise discarded.
Part of the v0.6.x parser-completeness work (see crates/AGENTS.md "Implemented subset").
Spec
- §3.5–3.6 generics, supertraits, struct bounds; §16
generic_params / where_clause.
Scope
Notes
needs-design: settle the AST shape for bounds (single vs. multiple bounds, lifetime vs. type params, defaults) before implementing — it has long-tail implications for the eventual type checker. Coordinate with the trait/impl-body issue so impl<T> / trait T<U> params are captured consistently.
Summary
Generic parameter lists are skipped to the balanced
<…>(maybe_generic_params) and not stored in the AST, sofn f<T: Bound>(),struct S<T>, etc. lose their type parameters. Bounds and where-clauses (maybe_where_clause) are likewise discarded.Part of the v0.6.x parser-completeness work (see
crates/AGENTS.md"Implemented subset").Spec
generic_params/where_clause.Scope
fn,struct,enum,trait,impl,type.Notes
needs-design: settle the AST shape for bounds (single vs. multiple bounds, lifetime vs. type params, defaults) before implementing — it has long-tail implications for the eventual type checker. Coordinate with the trait/impl-body issue so
impl<T>/trait T<U>params are captured consistently.