Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Properly handle annotating leading whitespace#334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@Muscraft
Copy link
Member

rustc has a test for annotating ano-break space near the start of a line with whitespace following it.annotate-snippets currently fails this test because it usesstd::char::is_whitespace for calculatingwhitespace_left, which treatsno-break space as whitespace, leadingwhitespace_left to be larger thanlabel_right, which causes a subtract with overflow panic.rustc gets around this by usingrustc_parse::is_whitespace, which does not treat a no-break space as whitespace. That solution only masks the problem, as it would still panic when annotating whitespace chars with more whitespace following them. Instead, this PR fixes theMargin calculations to allow annotating whitespace before more whitespace.

@epageepage merged commitffa5268 intorust-lang:masterOct 28, 2025
14 of 15 checks passed
@MuscraftMuscraft deleted the fix-annotating-leading-whitespace branchOctober 28, 2025 14:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Muscraft@epage

[8]ページ先頭

©2009-2025 Movatter.jp