-
Notifications
You must be signed in to change notification settings - Fork 13.4k
libsyntax: small refactorings #51945
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
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
if self.token == *ket { | ||
self.bump(); | ||
} | ||
self.eat(ket); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should change diagnostics by adding ket
to the expected set, but it looks like a desirable change in this case.
@@ -365,6 +365,10 @@ impl Token { | |||
self == &Lt || self == &BinOp(Shl) | |||
} | |||
|
|||
crate fn is_args_start(&self) -> bool { | |||
self.is_qpath_start() || self == &OpenDelim(Paren) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the tokens technically coincide with the is_qpath_start
set, but <
/<<
in Type<T>
/Type<<X as Y>::Assoc>
is not a qpath start at all.
I'd remove this commit.
}, | ||
_ => None, | ||
}; | ||
if let Some(path) = meta_ident { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outlining a small function that's used only once doesn't look like a good style to me.
I'd remove this commit.
Thanks! |
Triage; @topecongiro is there any update on this? |
Ping from triage, @topecongiro it has been a while since the last time we heard from you, is there any update on this PR? |
Thank you for this PR @topecongiro! Unfortunately we haven't heard from you on this in a while, so I'm closing the PR to keep things tidy. Don't worry though, if you'll have time again in the future please reopen this PR, we'll be happy to review it again! |
Replace check() + bump() with eat() cc #51945. r? @petrochenkov
This PR consists of small refactorings to libsyntax.