rust-lang / rust-lang/rust-analyzer
RA getting confused on the combo of test_log::test and ntest::timeout
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Since a few weeks, RA is giving me Expected identifier! error on all ntest::timeout macro usage in my code, when used together with test_log::test macro (see screenshot). Since I'm using this comb in most of my tests, that's quite many errors so it's hard to see how many real errors I got.

I can reproduce in both VS Code and vim.
rust-analyzer version: 0add6e95e 2021-12-20 stable (but I get the same with: 4ea1f58bf 2021-12-23 nightly).
rustc version: v1.56.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the diagnostic by combining test_log::test with ntest::timeout in a Rust test, using the reported rust-analyzer versions and either VS Code or vim. Compare the reported errors with the actual code; done when valid ntest::timeout usages no longer produce Expected identifier! diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100