Skip to content

fix(parser): emit targeted diagnostic for fields inside traits - #162103

Open
raushan728 wants to merge 2 commits into
rust-lang:mainfrom
raushan728:issues/161815
Open

fix(parser): emit targeted diagnostic for fields inside traits#162103
raushan728 wants to merge 2 commits into
rust-lang:mainfrom
raushan728:issues/161815

Conversation

@raushan728

@raushan728 raushan728 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #161815

Detect ident: Type or self: Type inside trait bodies to emit a clearer diagnostic.

Detect `ident: Type` or `self: Type` inside trait bodies to emit a clearer diagnostics.
@rustbot

rustbot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 1, 2026
@rustbot

rustbot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, parser
  • compiler, parser expanded to 75 candidates
  • Random selection from 18 candidates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing diagnostic when trying to define a field in a trait

3 participants