Skip to content

In LitStr::parse_with, report correct span for lex errors - #2080

Merged
dtolnay merged 1 commit into
dtolnay:masterfrom
sunshowers:lit-str-span
Sep 4, 2026
Merged

In LitStr::parse_with, report correct span for lex errors#2080
dtolnay merged 1 commit into
dtolnay:masterfrom
sunshowers:lit-str-span

Conversation

@sunshowers

Copy link
Copy Markdown
Contributor

In proc macros, we were previously falling back to Span::call_site in this case. The other errors in this function return correct spans, so match that here.

(Not sure how to write a test for this in this repo, but I patched it into a dependency and it seems to work.)

In proc macros, we were previously falling back to `Span::call_site` in this case. The other errors in this function return correct spans, so match that here.

@dtolnay dtolnay left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay
dtolnay merged commit 74e7d75 into dtolnay:master Sep 4, 2026
19 checks passed
@dtolnay

dtolnay commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Published in 3.0.5.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants