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

use_group_as RFC #1219

Merged
merged 2 commits into from Aug 7, 2015
Merged

use_group_as RFC #1219

merged 2 commits into from Aug 7, 2015

Conversation

seanmonstar
Copy link
Contributor

Allow aliasing imports when importing as a group.

use std::io::{
    Error as IoError,
    Read,
    Write
}

Rendered

Postponed RFC #867 (See for previous discussion).
Closes #933

@gsingh93
Copy link

👍

I don't see why we shouldn't make self aliasable?

@retep998
Copy link
Member

🐰 👍 + self

@Kimundi
Copy link
Member

Kimundi commented Jul 21, 2015

👍 including self - there is no reason to treat it special.

@Manishearth
Copy link
Member

👍 self should be included too

@eddyb
Copy link
Member

eddyb commented Jul 21, 2015

Definitely want this, have been trying to use as in groups so many times and every time the compiler reminded me it's not a feature yet.
self is no different than the other entries in a group, at the syntactical level, so there's no point to disallow renaming it.

@nrc nrc added the T-lang Relevant to the language team, which will review and decide on the RFC. label Jul 21, 2015
@nrc
Copy link
Member

nrc commented Jul 21, 2015

I think we should do this, and now seems like a reasonable time to re-open the issue.

@seanmonstar
Copy link
Contributor Author

Updated to include self as renameable.

@nrc nrc self-assigned this Jul 23, 2015
@nikomatsakis
Copy link
Contributor

Hear ye, hear ye. This RFC is entering final comment period.

@nikomatsakis nikomatsakis added the final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. label Jul 24, 2015
@blaenk
Copy link
Contributor

blaenk commented Jul 25, 2015

Awesome!! Let's do it.

@arthurprs
Copy link

👍


# Motivation

THe current design requires the above example to be written like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/THe/The/ (unless it's intentional for some strange reason which I'm guessing it isn't)

@DanielKeep
Copy link

👍

2 similar comments
@Havvy
Copy link
Contributor

Havvy commented Jul 31, 2015

👍

@strega-nil
Copy link

👍

@aturon
Copy link
Member

aturon commented Jul 31, 2015

I've definitely wanted this from time to time. 👍 from me.

@sgrif
Copy link
Contributor

sgrif commented Aug 4, 2015

Definitely 👍, this seems like a reasonable inclusion, although I've never had need for the self aliasing.

@Manishearth
Copy link
Member

I have a working (but unpolished) implementation here

(Needs grammar changes/tests and I should probably reorganize the ViewPath AST stuff too)

@nikomatsakis
Copy link
Contributor

It's official! The lang subteam has decided to accept this RFC.

@nikomatsakis nikomatsakis merged commit d0e72a7 into rust-lang:master Aug 7, 2015
nikomatsakis added a commit that referenced this pull request Aug 7, 2015
@nikomatsakis nikomatsakis removed the final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. label Aug 7, 2015
@nikomatsakis
Copy link
Contributor

Tracking issue for this RFC is rust-lang/rust#27578

bors added a commit to rust-lang/rust that referenced this pull request Aug 10, 2015
An implementation of [RFC 1219](rust-lang/rfcs#1219).

The RFC is not merged yet, but once merged, this could be.
@marcioAlmada
Copy link

thank you!
🎉

critiqjo pushed a commit to critiqjo/rustdoc that referenced this pull request Dec 16, 2016
An implementation of [RFC 1219](rust-lang/rfcs#1219).

The RFC is not merged yet, but once merged, this could be.
@Centril Centril added A-paths Path related proposals & ideas A-resolve Proposals relating to name resolution. A-modules Proposals relating to modules. labels Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-modules Proposals relating to modules. A-paths Path related proposals & ideas A-resolve Proposals relating to name resolution. T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet