rust-lang / rust-lang/rust-analyzer

RA getting confused on the combo of test_log::test and ntest::timeout

Open
#11,109 7 comments 0 reactions 0 assignees View on GitHub

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.

Screenshot from 2021-12-23 16-11-33

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.