rust-lang / rust-lang/rust-analyzer

Diagnostic appears only inside function

Open
#12,617 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-support
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 13h
Merged PRs (30d)
69

Description

rust-analyzer version:2022-06-20

rustc version: 1.61.0

relevant settings:nothing changed

Errors and other diagnostic features appears only 'outside function' like
image

But if i delete 'qwewqeq' erros doesn't apeears
image

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

Start by reproducing the diagnostic behavior with rust-analyzer 2022-06-20 and rustc 1.61.0, using the screenshots as the only provided example. The report names no source file, test, or minimal reproduction, so first identify the diagnostic entry point and add a focused regression test. Done means the reported error appears consistently in the appropriate location rather than only outside a function.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.