# debugger: Fix running ignored Rust tests in nested modules \(\#54787\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c52842c3aa1a46029e99beb1128c5e07232f3a84)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c52842c3aa1a46029e99beb1128c5e07232f3a84

Requested commit: c52842c3aa1a46029e99beb1128c5e07232f3a84

Commit: c52842c3aa1a46029e99beb1128c5e07232f3a84

Tree: 45825bf9ff9b26989d7388fff6f4db5507d48317

Author: Tom Houlé

Committer: GitHub

## Message

```
debugger: Fix running ignored Rust tests in nested modules (#54787)

Debugging an ignored Rust test whose code lives in a nested module (e.g.
`variant_get::test::get_complex_variant`) sometimes exited immediately
with "0 tests matched", When the test name itself came from tree-sitter
runnable capture, which sees only the bare function identifier. So
`--exact get_complex_variant` filtered out the actual test.

The fix is to only append `--exact` when the name contains `::`.
rust-analyzer's `experimental/runnables` produces qualified paths and
keeps the disambiguation introduced in #43110, and the runnables from
tree-sitter no longer break for nested modules.

Closes #51810.

Release Notes:

- Fixed debugging Rust tests in nested modules sometimes immediately
exiting with "0 tests matched".
```

## Parents

- [b27c1bb78e929cd9497fb81f50a65d5bb0f79881](https://git.cafe/gitcafe/zed/commit/b27c1bb78e929cd9497fb81f50a65d5bb0f79881?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c52842c3aa1a46029e99beb1128c5e07232f3a84?format=markdown)
