You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mod parent {mod child {usesuper::Test;pubfnchild_fn(test:Test){}}structTest(u32);}
The above fails to compile on rustc 1.6.0-nightly (2ba44607f 2015-11-22) (Playground link: http://is.gd/kngh6n).
I want to be able to use child_fn from within the parent module. Since the child module and its types are completely private to the parent module, shouldn't this work?
The text was updated successfully, but these errors were encountered:
And then you add pub use self::child::child_fn; in the parent module and private Test leaks outside of parent. So, this is by design, yes.
Perhaps the compiler should wait till I actually leak Test before it starts complaining. Having said that, I can appreciate how much simpler/faster it would be to implement the design from the RFC linked to #27608.
The above fails to compile on
rustc 1.6.0-nightly (2ba44607f 2015-11-22)
(Playground link: http://is.gd/kngh6n).I want to be able to use
child_fn
from within the parent module. Since the child module and its types are completely private to the parent module, shouldn't this work?The text was updated successfully, but these errors were encountered: