[rust-dev] Convenience syntax for importing the module itself along with items within

Gulshan Singh gsingh_2011 at yahoo.com
Tue Jun 3 09:56:35 PDT 2014

+1, I was planning on suggesting this as well.
On Jun 3, 2014 2:16 AM, "Tommi" <rusty.gates at icloud.com> wrote:

> I find it somewhat jarring to have to spend two lines for the following
> kind of imports:
> use module::Type;
> use module;
> So, I suggest we add a nicer syntax for doing the above imports using the
> following single line:
> use module::{self, Type};
> It would probably be a good idea to force the `self` to be the first item
> on that list. And if someone writes the following...
> use module::self;
> ...that should probably cause at least a warning saying something like
> "You should write `use module;` instead of `use module::self;`".
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140603/2f6c1b51/attachment.html>

More information about the Rust-dev mailing list