Skip to main content

assoc_fn_def

Function assoc_fn_def 

Source
pub fn assoc_fn_def(method: &AIRNode) -> bool
Expand description

True when an impl/trait method (an bock_air::NodeKind::FnDecl) is an associated function — it does not bind a leading self receiver, so it is reached as Type.method(...) rather than value.method(...).

Such a method must be emitted as a static / free function (no synthesized receiver, no spurious self parameter) on every backend; otherwise the generic impl-method path attaches it as an instance method and the associated call cannot resolve it. The companion to is_associated_call, which recognises the matching call shape.