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 globs as RFC #867

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
@seanmonstar
Copy link
Contributor

seanmonstar commented Feb 16, 2015

Allow aliasing imports when used in a glob import.

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

Rendered

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Feb 16, 2015

👍

Nit: "glob" refers to use a::*, not use a::{b, c}.

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Feb 16, 2015

@sfackler I thought so, but the reference calls use a::{b, c} a path_glob.

@P1start

This comment has been minimized.

Copy link
Contributor

P1start commented Feb 16, 2015

@seanmonstar Then I guess the reference is wrong, or at least slightly inaccurate with regard to naming. * imports were feature gated with the name glob, the term ‘glob’ usually refers to * (and similar) characters that get expanded in shells, and I’ve just never heard the term ‘glob’ used to describe the brace syntax in Rust.

I think the reference might be using the term ‘glob’ in a slightly more general sense, referring to any sort of expansion done by shells (both foo* and foo{a,b} are syntaxes used in shells like bash).

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 16, 2015

+1
When I tried it I was surprised it didn't just worked.

@retep998

This comment has been minimized.

Copy link
Member

retep998 commented Feb 17, 2015

👍
Are there any possible reasons for why we shouldn't allow this?

@jfager

This comment has been minimized.

Copy link

jfager commented Feb 17, 2015

+1, been bumping into this a lot recently.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Feb 17, 2015

So, to be clear, the RFC proposed is not allowing use foo::{self as quux, bar};

Is that intentional? (It seems reasonable to allow it, but also reasonable to delay implementing such an extension, if for some reason its more difficult in the resolve infrastructure.)

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Feb 17, 2015

@pnkfelix that's actually in the Unresolved Questions section. I can see it being useful, but wasn't sure the consensus.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Feb 20, 2015

@seanmonstar ah, right you are, sorry for the noise

@reem

This comment has been minimized.

Copy link

reem commented Feb 23, 2015

+1, I have wanted this.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Mar 4, 2015

Thank you very much for your contribution!

Clearly lots of people really like this idea. However, it is something we can add backwards compatibly after 1.0 ships (and it seems like we can continue getting by without it in the meantime).

So, we are going to postpone this RFC (see issue #933), but hopefully will address it sometime after 1.0 ships.

Thanks again

@pnkfelix pnkfelix closed this Mar 4, 2015

@pnkfelix pnkfelix added the postponed label Mar 4, 2015

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Apr 22, 2015

@pnkfelix being postponed, would this mean accepted essentially? If I or someone else were to create a PR for 1.1, would that be accepted?

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Apr 23, 2015

@seanmonstar no, it means that a decision has been postponed. Post-1.0, you could open a new RFC PR or re-open this one.

@seanmonstar

This comment has been minimized.

Copy link
Contributor Author

seanmonstar commented Jul 20, 2015

@nrc You said i could re-open this one? I don't believe I have permission to do so (I don't see the button), but if I were to open an new PR, it would be the same commit exactly...

@seanmonstar seanmonstar referenced this pull request Jul 21, 2015

Merged

use_group_as RFC #1219

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Jul 21, 2015

"re-open" means ask someone with the right privs to re-open for you, I guess (due to the GH security model, not Rust policy), but creating a new PR (like you've done) is totally fine.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Jul 21, 2015

2015-07-21-163925_465x95_scrot

@nixpulvis

This comment has been minimized.

Copy link

nixpulvis commented Jan 11, 2016

Related #1400

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.