Skip to content

Conversation

Muscraft
Copy link
Member

@Muscraft Muscraft commented Jul 3, 2025

When given a patch span beyond the end of the source, we silently allow it to work. Conversely, when we are given an annotation span beyond the end of the source, we panic. This PR makes it so that we consistently panic when given spans beyond the end of a source.

Note: This PR is only meant to make annotate-snippets behave consistently and does not intend to delve into what the correct response should be.

@Muscraft Muscraft force-pushed the sugg-span-beyond-buffer branch from 32ca293 to 83d2cbb Compare July 3, 2025 20:50
@Muscraft Muscraft merged commit ca9f5e5 into rust-lang:master Jul 3, 2025
15 checks passed
@Muscraft Muscraft deleted the sugg-span-beyond-buffer branch July 3, 2025 20:54
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