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; /* ``-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