Update last_span in replace_token - #12849
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Why not self.last_span = self.span ?
I'm sure I'm missing something.
Contributor
There was a problem hiding this comment.
(obviously, before self.span = mk_sp(lo, hi))
Member
Author
There was a problem hiding this comment.
Not missing anything, I just missed tidying this up when I refactored it.
Contributor
There was a problem hiding this comment.
What about self.last_span = self.span ? Am I missing something obvious?
Member
Author
There was a problem hiding this comment.
The last span is going to be sub-span of self.span, for example with >>, we are replacing the current token with >, so the current span will be the second > and the last span should be the first >, we don't want it to be the span for all of >>
bors
added a commit
that referenced
this pull request
Mar 13, 2014
fasterthanlime
pushed a commit
to fasterthanlime/rust
that referenced
this pull request
Jul 24, 2022
internal: Don't parse files unnecessarily in scope_for_offset
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Jun 13, 2024
…tern, r=Alexendoo Add lint to check manual pattern char comparison This PR adds a new lint asked in rust-lang/rust-clippy#12490 This lint catches manual char comparison in pattern of string functions and propose to use `char` or array of `char` instead. As it's my first contribution i'm not feeling very safe about not matching too much or missing some cases. Thanks in advance for taking time to review and propose feedback ! changelog: new lint [`manual_pattern_char_comparison`]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.