Skip to content

fix: broken line:column indicator in errors - #6996

Open
eopb wants to merge 1 commit into
rust-lang:mainfrom
eopb:push-vkzonostxxvy
Open

fix: broken line:column indicator in errors#6996
eopb wants to merge 1 commit into
rust-lang:mainfrom
eopb:push-vkzonostxxvy

Conversation

@eopb

@eopb eopb commented Jul 29, 2026

Copy link
Copy Markdown

I noticed that I was seeing error messages from rustfmt that contained paths ending in :line:line:column. The example :3:3:20 can be found in the snapshot tests in this diff.

This appears to be related to how annotate_snippets automatically appends these indicators when annotations are set.

To fix this, I'm only appending :line when annotations are not set.

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Jul 29, 2026
@eopb
eopb force-pushed the push-vkzonostxxvy branch 2 times, most recently from 585d843 to d4f6091 Compare July 29, 2026 14:11
I noticed that I was seeing error messages from rustfmt that contained paths ending in `:line:line:column`.
The example `:3:3:20` can be found in the snapshot tests in this diff.

This appears to be related to how `annotate_snippets` automatically appends these indicators when annotations are set.

To fix this, I'm only appending `:line` when annotations are not set.
@eopb
eopb force-pushed the push-vkzonostxxvy branch from d4f6091 to 475f85c Compare July 29, 2026 14:11
@ytmimi ytmimi self-assigned this Jul 29, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants