Return a single diagnostic from lex_token_trees.#156031
Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
Open
Return a single diagnostic from lex_token_trees.#156031nnethercote wants to merge 1 commit intorust-lang:mainfrom
lex_token_trees.#156031nnethercote wants to merge 1 commit intorust-lang:mainfrom
Conversation
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.
Collaborator
|
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease |
Member
|
looks good for me, r=me when CI is green. |
Contributor
Author
|
@bors r=chenyukang rollup |
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It currently returns a
Vecbut 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