Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(extract): test the empty Rust impl name before the cut

Martin Vogelfed5cbf9cc0d
diff --git a/internal/cbm/extract_unified.c b/internal/cbm/extract_unified.c
index ce7be6d29..b96e60a91 100644
--- a/internal/cbm/extract_unified.c
+++ b/internal/cbm/extract_unified.c
@@ -1166,12 +1166,12 @@ static const char *compute_class_qn(CBMExtractCtx *ctx, TSNode node, const WalkS
* and all its calls fall back to the File node. */
if (ctx->language == CBM_LANG_RUST && strcmp(ts_node_type(node), "impl_item") == 0) {
char *lt = strchr(name, '<');
+ if (lt == name) {
+ return NULL; /* `<T as Tr>`-style self type: no name to scope by */
+ }
if (lt) {
*lt = '\0';
}
- if (!name[0]) {
- return NULL;
- }
}
/* Nested class: prefix with the enclosing class QN (Outer.Inner) so this