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
Closed

Conversation

seanmonstar
Copy link
Contributor

Allow aliasing imports when used in a glob import.

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

Rendered

@sfackler
Copy link
Member

👍

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

@seanmonstar
Copy link
Contributor Author

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

@ftxqxd
Copy link
Contributor

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

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

@retep998
Copy link
Member

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

@jfager
Copy link

jfager commented Feb 17, 2015

+1, been bumping into this a lot recently.

@pnkfelix
Copy link
Member

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

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

@pnkfelix
Copy link
Member

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

@reem
Copy link

reem commented Feb 23, 2015

+1, I have wanted this.

@pnkfelix
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 RFCs that have been postponed and may be revisited at a later time. label Mar 4, 2015
@seanmonstar
Copy link
Contributor Author

@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
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
Copy link
Contributor Author

@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 mentioned this pull request Jul 21, 2015
@nrc
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
Copy link
Member

2015-07-21-163925_465x95_scrot

@nixpulvis
Copy link

Related #1400

@steveklabnik steveklabnik removed the postponed RFCs that have been postponed and may be revisited at a later time. label Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.