Open santhosh-tekuri opened 1 year ago
We cannot directly expand it to pub use inner::S2
.
Considering the following program:
pub use inner::*;
mod inner {
pub(crate) struct S1;
pub struct S2;
}
fn main() {
let _ = S1;
let _ = S2;
}
If directly expanded to pub use inner::S2
, then S1
would not be accessible. So it is more complicated to correctly handle pub(crate)
.
on expanding alias in
pub use inner::*
it becomespub use inner::{S1, S2)
resulting in compilation error. it is expected to expand aspub use inner::S2