-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
Importing all the subnames of a module is easily done with globs but if you also want to import the module, then you need 2 separate lines to do so:
use my_mod::*;
use my_mod;Without globs it's not an issues:
use my_mod::{self, foo, bar, baz};It would be convenient to allow globs to import the module on the same line as well. Here are some possible syntaxes which (I think) could be understandable:
use my_mod::{self, *};
use my_mod::+;+ is mainly because * and + are common with globs. + typically means one or more while * is any number of elements so they aren't exactly similar but it doesn't seem too unusual.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.