Skip to content

calls_out (rust): macros name!( and turbofish name::<T>( missed; match/let patterns counted as calls #3643

Closed
squid-protocol/keyword-rosetta
#157

Description

@squid-protocol

Part of #3641. The shapes are validated in docs/self_scan/graph_comparison_ledger.json.

Misses (tree-sitter-only calls; macros and generic calls are calls per C3):

  • macro_invocation, 424: matches!(, format!(, unreachable!(, assert_eq!(, quote!. The C-style \b(name)\s*\( pattern can't see name!(.
  • Turbofish generic_function, 238: world.query::<&A>(), assert_all_sizes_equal::<&A, With<B>>(…), .collect::<Vec<_>>(). The ::<…> step between the name and ( defeats the pattern.

Counted but not calls (GitGalaxy-only; a pattern is not a call, per the C3 amendment of 2026-09-25):

  • scoped_identifier<tuple_struct_pattern, 387: Data::Enum(data) =>, Err(X::NotSpawned(err)) =>.
  • tuple_struct_pattern<match_pattern, 55: Ok(t) =>, Err(e) =>, Some(_) =>.
  • tuple_struct_pattern<let_condition, 46: if let Some(x) =, while let Some(b) =.

Fix direction: rust gets its own calls_out pattern in QUALIFIED_CALLS_OUT_PATTERNS, as ruby did in #3637:

  • accept name!( / name![ / name!{, and name::<…>( with a bounded generic step;
  • skip a Name( that is followed, after its balanced ), by => (a match arm), or that sits after let / if let / while let before =. Both checks must stay bounded, to meet the ReDoS rules.

Measure: call_graph_accuracy.py --buckets 3 (rust today: 87.4% raw precision, 90.3% recall).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions