rust-lang / rust-lang/rust-analyzer

Move test runnable inspection from AST to HIR

Open
#15,166 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-ide A-macro C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Right now we kind of determine whether something is a test function or module by inspecting the definitions attributes whether they contain test by mere name. This kind of fails as the test attribute is not a builtin one (merely its implementation is). If we were expanding it we could just inspect the expansion, but we aren't doing that unfortunately to save some memory usage as the expansion is kind of pointless.

cc https://github.com/rust-lang/rust-analyzer/pull/15157#issuecomment-1612001878

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

No files, tests, or entry points are named. Start by tracing the existing test-runnable inspection from AST definitions to the HIR representation, then verify that non-builtin test attributes are recognized without expanding them and that existing runnable detection behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.