Skip to content

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

Closed
wants to merge 6 commits into from

Conversation

topecongiro
Copy link
Contributor

This PR consists of small refactorings to libsyntax.

@rust-highfive
Copy link
Contributor

r? @pnkfelix

(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 Jun 30, 2018
@topecongiro
Copy link
Contributor Author

r? @petrochenkov

if self.token == *ket {
self.bump();
}
self.eat(ket);
Copy link
Contributor

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)
Copy link
Contributor

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 {
Copy link
Contributor

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.

@petrochenkov
Copy link
Contributor

Thanks!
r=me after addressing the two comments above

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2018
@XAMPPRocky
Copy link
Member

Triage; @topecongiro is there any update on this?

@stokhos
Copy link

stokhos commented Jul 21, 2018

Ping from triage, @topecongiro it has been a while since the last time we heard from you, is there any update on this PR?

@pietroalbini
Copy link
Member

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!

@pietroalbini pietroalbini added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2018
bors added a commit that referenced this pull request Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants