Isn’t that more ergonomic and intuitive? Example:
mod outer {
pub mod m {
pub type X = i32;
}
use self::m::X;
type Y = X;
type Z = i32;
mod n {
use super::X; // NG
type P = X;
use super::Y; // OK
type Q = Y;
use super::Z; // OK
type R = Z;
}
}
As of now, we must either change use
to pub use
or change super::X
to super::m::X
. The former breaks modularity (I don’t necessarily want to expose X
to an user of outer
) and the latter almost ignores the raison d’etre of importing.