Skip to content

fix(code-index): calls through function-local use are dropped as complete #2253

Description

@ScriptedAlchemy

Problem

A qualified Rust call that goes through a use declared inside a function body or block does not bind, and tracedecay_callers still reports coverage.completeness = complete for the target. The caller is silently missing.

Reproduction

tokio 1.53.1 (tag tokio-1.53.1), indexed with the shipped CLI on an isolated profile. tokio/src/runtime/context/current.rs::with_current has seven call sites of the form context::with_current(...) in tokio/src. tracedecay_callers (depth 1) returns 5 with complete. The two missing callers both import context inside the function:

  • tokio/src/task/spawn.rs:188 spawn_inner: use crate::runtime::{context, task}; at the top of the function body, then context::with_current(...) at line 211.
  • tokio/src/runtime/time_alt/timer.rs:72: use crate::runtime::context; inside a #[cfg(feature = "rt")] { ... } block, then context::with_current(...) at line 78.

The five resolved callers import context at module scope.

Expected: both calls bind to with_current. If function-scoped imports are not modeled, the answer should be partial with a typed omission rather than complete.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions