rust-lang / rust-lang/rust-analyzer

Undetected error

Open
#15,289 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

rust-analyzer version: rust-analyzer 1 (833d5301d1 2023-05-07)

rustc version: rustc 1.71.0 (8ede3aae2 2023-07-12)

relevant settings: none


There is no error, for the last generic, when an attribute is appended.


///fine
pub

struct

Test

< ///fine
    T

    :

    Clone
    ///SHOUT THROW AND ERROR == #[doc="self"]
>
///fine
{
    ///fine
    t
    ///fine
    :
    ///fine
    T
    ///fine
}
///fine

cargo check:

error: expected one of `(`, `+`, `,`, `::`, `<`, `=`, or `>`, found doc comment 
///SHOUT THROW AND ERROR 

Clion does not seem to recognize the error. I have saved and reloaded the file/idea/restarted/cache cleared.

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 snippet in rust-analyzer and compare its diagnostics with the cargo check output shown in the issue. Check whether the doc comment on the final generic bound is reported in the IDE; done means rust-analyzer recognizes the same syntax error.

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.