extractRustImplItem — `impl Trait for Type` back-reference from the grammar's `trait` / `type` fields (#1588; an inherent impl has no `trait` field and emits nothing). Target = FIRST earlier node of kind struct/union/enum/class (never trait) named by impl_type_name; ref FROM the type's node, named by the trait's full text (scoped path / generic args kept), at the trait node's position.
(&mut self, node: Node<'t>)
| 1174 | /// the type's node, named by the trait's full text (scoped path / generic |
| 1175 | /// args kept), at the trait node's position. |
| 1176 | fn extract_rust_impl_item(&mut self, node: Node<'t>) { |
| 1177 | let Some(trait_node) = node.child_by_field_name("trait") else { |
| 1178 | return; |
| 1179 | }; |
| 1180 | let trait_name = self.text(trait_node).to_string(); |
| 1181 | let Some(type_name) = self.impl_type_name(node.child_by_field_name("type")) else { |
| 1182 | return; |
| 1183 | }; |
| 1184 | |
| 1185 | let target_row = self |
| 1186 | .nodes_meta |
| 1187 | .iter() |
| 1188 | .position(|m| m.name == type_name && matches!(m.kind, "struct" | "union" | "enum" | "class")) |
| 1189 | .map(|i| i as u32); |
| 1190 | if let Some(target_row) = target_row { |
| 1191 | self.push_ref_at(target_row, &trait_name, edge_kind_index("implements").unwrap(), trait_node); |
| 1192 | } |
| 1193 | } |
| 1194 | |
| 1195 | /// extractTypeAnnotations — parameters + return_type subtrees, one |
| 1196 | /// `references` ref per type_identifier leaf not in BUILTIN_TYPES. The |
no test coverage detected