Skip to content

Return a single diagnostic from lex_token_trees.#156031

Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:lex_token_trees
Open

Return a single diagnostic from lex_token_trees.#156031
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:lex_token_trees

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

It currently returns a Vec but in practice it always has one diagnostic in it.

LLM disclosure: Claude Code identified this when I asked it to review tokentrees.rs. I made the change by hand and tested it myself.

r? @chenyukang

It currently returns a `Vec` but in practice it always has one
diagnostic in it.

LLM disclosure: Claude Code identified this when I asked it to review
`tokentrees.rs`. I made the change by hand and tested it myself.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 1, 2026

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 May 1, 2026
@chenyukang
Copy link
Copy Markdown
Member

looks good for me, r=me when CI is green.

@nnethercote
Copy link
Copy Markdown
Contributor Author

@bors r=chenyukang rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

📌 Commit c9d0bdc has been approved by chenyukang

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 1, 2026
…nyukang

Return a single diagnostic from `lex_token_trees`.

It currently returns a `Vec` but in practice it always has one diagnostic in it.

LLM disclosure: Claude Code identified this when I asked it to review `tokentrees.rs`. I made the change by hand and tested it myself.

r? @chenyukang
jhpratt added a commit to jhpratt/rust that referenced this pull request May 1, 2026
…nyukang

Return a single diagnostic from `lex_token_trees`.

It currently returns a `Vec` but in practice it always has one diagnostic in it.

LLM disclosure: Claude Code identified this when I asked it to review `tokentrees.rs`. I made the change by hand and tested it myself.

r? @chenyukang
rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
Rollup of 6 pull requests

Successful merges:

 - #149637 (Do not run jump-threading for GPUs)
 - #155948 (Fix order-dependent visibility diagnostics)
 - #155600 (Adds a couple UI tests for polonius)
 - #155995 (-Zembed-source: also embed external source)
 - #156019 (Feed cleanups)
 - #156031 (Return a single diagnostic from `lex_token_trees`.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 1, 2026
…nyukang

Return a single diagnostic from `lex_token_trees`.

It currently returns a `Vec` but in practice it always has one diagnostic in it.

LLM disclosure: Claude Code identified this when I asked it to review `tokentrees.rs`. I made the change by hand and tested it myself.

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

3 participants