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 off by one error in multiline highlighting#42

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
zbraniecki merged 2 commits intorust-lang:masterfromdigama0:patch-1
Mar 2, 2021

Conversation

@digama0
Copy link
Contributor

Implements the fix described in#41.

Fixes#41

wongjiahau reacted with hooray emoji
@zbraniecki
Copy link
Contributor

Thank you for the contribution!

@zbraniecki
Copy link
Contributor

It seems like it makes fixture tests fail.@digama0 can you verify that the test positions should be affected by your patch and that the new end indexes are correct?

@zbraniecki
Copy link
Contributor

I see the following follow up PR fixing the tests:

diff --git a/tests/fixtures/no-color/multiline_annotation.toml b/tests/fixtures/no-color/multiline_annotation.tomlindex bdb577f..c3dc1e9 100644--- a/tests/fixtures/no-color/multiline_annotation.toml+++ b/tests/fixtures/no-color/multiline_annotation.toml@@ -33,7 +33,7 @@ range = [5, 19] [[slices.annotations]] label = "expected enum `std::option::Option`, found ()" annotation_type = "Error"-range = [22, 765]+range = [22, 766] [title] label = "mismatched types" id = "E0308"diff --git a/tests/fixtures/no-color/multiline_annotation2.toml b/tests/fixtures/no-color/multiline_annotation2.tomlindex 6ec0b1f..845bf9f 100644--- a/tests/fixtures/no-color/multiline_annotation2.toml+++ b/tests/fixtures/no-color/multiline_annotation2.toml@@ -10,7 +10,7 @@ fold = false [[slices.annotations]] label = "missing fields `lineno`, `content`" annotation_type = "Error"-range = [31, 127]+range = [31, 128]  [title] label = "pattern does not mention fields `lineno`, `content`"

@digama0
Copy link
ContributorAuthor

Yes, the new spans are one character too short now but that's because the input span was already compensating for this bug with an end index which ends one character before the actual span. (Was this a real span generated by rustc?) Your suggested fixes put the input spans where they should be, so the output should now be the same as before.

zbraniecki reacted with thumbs up emoji

@zbranieckizbraniecki merged commita0e10a8 intorust-lang:masterMar 2, 2021
@zbraniecki
Copy link
Contributor

Thank you for adding the tests!

wongjiahau reacted with hooray emoji

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

Reviewers

1 more reviewer

@zbranieckizbranieckizbraniecki approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Off-by-one error in multiline error highlights

2 participants

@digama0@zbraniecki

[8]ページ先頭

©2009-2025 Movatter.jp