Skip to content

Do not index past end of buffer when checking heuristic in error index syntax highlighter#156344

Open
estebank wants to merge 1 commit intorust-lang:mainfrom
estebank:issue-156326
Open

Do not index past end of buffer when checking heuristic in error index syntax highlighter#156344
estebank wants to merge 1 commit intorust-lang:mainfrom
estebank:issue-156326

Conversation

@estebank
Copy link
Copy Markdown
Contributor

@estebank estebank commented May 8, 2026

When checking whether the current token is a function indentifier by inspecting the syntax, do not attempt to access past the end of the code buffer.

Fix #156326.

…x syntax highlighter

When checking whether the current token is a function indentifier by inspecting the syntax, do not attempt to access past the end of the code buffer.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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 8, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 8, 2026

r? @petrochenkov

rustbot has assigned @petrochenkov.
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
  • compiler expanded to 73 candidates
  • Random selection from 17 candidates

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt check
Diff in /checkout/tests/run-make/explain-output/rmake.rs:7:
 
 fn main() {
     let out = rustc().args(&["--explain=E0602", "--color=always"]).run().stdout_utf8();
-    diff()
-        .expected_file("explain-E0602.stderr")
-        .actual_text("(rustc)", &out)
-        .run();
+    diff().expected_file("explain-E0602.stderr").actual_text("(rustc)", &out).run();
 }
 
fmt: checked 6853 files
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:00:48

@petrochenkov
Copy link
Copy Markdown
Contributor

r=me after fixing tidy.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

[ICE]: rustc --explain E0602 with syntax highlighting

4 participants