Summary
trait_def and impl_block skip their bodies (skip_item_body) — associated items (method signatures, associated types/consts, default methods, impl methods) are not parsed into the AST. Trait stores only a name; ImplBlock stores only a target type.
Part of the v0.6.x parser-completeness work (see crates/AGENTS.md "Implemented subset").
Spec
- §3.5 traits/impls, supertraits; §16
trait_item / impl_item. (The §10 orphan rule is a later semantic concern, not parsing.)
Scope
Notes
Reuses function_after_mods for methods. Coordinate with the generics issue so impl<T> / trait T<U> parameters are captured.
Summary
trait_defandimpl_blockskip their bodies (skip_item_body) — associated items (method signatures, associated types/consts, default methods, impl methods) are not parsed into the AST.Traitstores only a name;ImplBlockstores only a target type.Part of the v0.6.x parser-completeness work (see
crates/AGENTS.md"Implemented subset").Spec
trait_item/impl_item. (The §10 orphan rule is a later semantic concern, not parsing.)Scope
type/const.impl Trait for Typevs. inherentimpl Type, and any supertrait/fortarget.Notes
Reuses
function_after_modsfor methods. Coordinate with the generics issue soimpl<T>/trait T<U>parameters are captured.