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

Conversation

Projects
None yet
@seanmonstar
Copy link
Contributor

seanmonstar commented Jul 21, 2015

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

This comment has been minimized.

Copy link

gsingh93 commented Jul 21, 2015

👍

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

@retep998

This comment has been minimized.

Copy link
Member

retep998 commented Jul 21, 2015

🐰 👍 + self

@Kimundi

This comment has been minimized.

Copy link
Member

Kimundi commented Jul 21, 2015

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

@Manishearth

This comment has been minimized.

Copy link
Member

Manishearth commented Jul 21, 2015

👍 self should be included too

@eddyb

This comment has been minimized.

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 label Jul 21, 2015

@nrc

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Jul 22, 2015

Updated to include self as renameable.

@nrc nrc self-assigned this Jul 23, 2015

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 24, 2015

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

@blaenk

This comment has been minimized.

Copy link
Contributor

blaenk commented Jul 25, 2015

Awesome!! Let's do it.

@arthurprs

This comment has been minimized.

Copy link

arthurprs commented Jul 25, 2015

👍


# Motivation

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

This comment has been minimized.

@mdinger

mdinger Jul 25, 2015

Contributor

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

@DanielKeep

This comment has been minimized.

Copy link

DanielKeep commented Jul 30, 2015

👍

2 similar comments
@Havvy

This comment has been minimized.

Copy link
Contributor

Havvy commented Jul 31, 2015

👍

@ubsan

This comment has been minimized.

Copy link
Contributor

ubsan commented Jul 31, 2015

👍

@aturon

This comment has been minimized.

Copy link
Member

aturon commented Jul 31, 2015

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

@sgrif

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

Manishearth commented Aug 6, 2015

I have a working (but unpolished) implementation here

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 7, 2015

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 7, 2015

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

Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
An implementation of [RFC 1219](rust-lang/rfcs#1219).

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

This comment has been minimized.

Copy link

marcioAlmada commented Aug 19, 2015

thank you!
🎉

critiqjo pushed a commit to critiqjo/rustdoc that referenced this pull request Dec 16, 2016

Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
An implementation of [RFC 1219](rust-lang/rfcs#1219).

The RFC is not merged yet, but once merged, this could be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.