Skip to content

Avoid byte to char position conversions in is_multiline #86778

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jul 1, 2021

Converting a byte position into a char position is currently linear in
the number of multibyte characters in the source code. Avoid it when
checking if a range spans across lines.

This makes it feasible to compile source files with a large number of
multibyte characters.

Converting a byte position into a char position is currently linear in
the number of multibyte characters in the source code. Avoid it when
checking if a range spans across lines.

This makes it feasible to compile source files with a large number of
multibyte characters.
@rust-highfive
Copy link
Contributor

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 1, 2021
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 3, 2021

📌 Commit 7a41076 has been approved by davidtwco

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2021
@bors
Copy link
Collaborator

bors commented Jul 3, 2021

⌛ Testing commit 7a41076 with merge 96859db...

@bors
Copy link
Collaborator

bors commented Jul 3, 2021

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 96859db to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 3, 2021
@bors bors merged commit 96859db into rust-lang:master Jul 3, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 3, 2021
@tmiasko tmiasko deleted the fast-multiline branch July 3, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants