Skip to content
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

Lexer: Fix offset handling in get_str_from() #7005

Closed
wants to merge 1 commit into from

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Jun 8, 2013

As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.

As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
@brson
Copy link
Contributor

brson commented Jun 8, 2013

Beautiful fix for an old bug! 🍒

bors added a commit that referenced this pull request Jun 8, 2013
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
@bors bors closed this Jun 8, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 5, 2022
…dnet

Add `large_include_file` lint

changelog: Add [`large_include_file`] lint
closes rust-lang#7005
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.

4 participants