-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement import renaming with _
(RFC 2166)
#48922
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -7037,7 +7037,11 @@ impl<'a> Parser<'a> { | |||
|
|||
fn parse_rename(&mut self) -> PResult<'a, Option<Ident>> { | |||
if self.eat_keyword(keywords::As) { | |||
self.parse_ident().map(Some) | |||
if self.eat(&token::Underscore) { | |||
Ok(Some(Ident::with_empty_ctxt(Symbol::gensym("_")))) |
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.
Oh man what a hack. But clever =)
@bors r+ |
📌 Commit e351288 has been approved by |
@bors r- |
er, mistake, sorry |
@bors r+ |
📌 Commit e351288 has been approved by |
@bors r=nikomatsakis |
📌 Commit 12ac032 has been approved by |
Implement import renaming with `_` (RFC 2166) cc rust-lang#48216
cc #48216