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>)
| 1064 | /// the type's node, named by the trait's full text (scoped path / generic |
| 1065 | /// args kept), at the trait node's position. |
| 1066 | fn extract_rust_impl_item(&mut self, node: Node<'t>) { |
| 1067 | let Some(trait_node) = node.child_by_field_name("trait") else { |
| 1068 | return; |
| 1069 | }; |
| 1070 | let trait_name = self.text(trait_node).to_string(); |
| 1071 | let Some(type_name) = self.impl_type_name(node.child_by_field_name("type")) else { |
| 1072 | return; |
| 1073 | }; |
| 1074 | |
| 1075 | let target_row = self |
| 1076 | .nodes_meta |
| 1077 | .iter() |
| 1078 | .position(|m| m.name == type_name && matches!(m.kind, "struct" | "union" | "enum" | "class")) |
| 1079 | .map(|i| i as u32); |
| 1080 | if let Some(target_row) = target_row { |
| 1081 | self.push_ref_at(target_row, &trait_name, edge_kind_index("implements").unwrap(), trait_node); |
| 1082 | } |
| 1083 | } |
| 1084 | |
| 1085 | /// extractTypeAnnotations — parameters + return_type subtrees, one |
| 1086 | /// `references` ref per type_identifier leaf not in BUILTIN_TYPES. The |
no test coverage detected