-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Currently, if all the symbols in a crate have already been privately imported via use foo::*
, it is not possible to publicly re-export any of them via pub use foo::Bar
.
The use case where this comes up is in writing a wrapper library. All of the code will be dealing with types and functions from one crate, so it is desirable to wildcard-import everything. However, it may also be necessary to re-export some of those types, which is currently not possible.
In code, it would be nice if this worked:
use foo::*;
pub use foo::Bar;
Whereas currently it fails with error: a type named 'Bar' has already been imported in this module [E0252]
.
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.