Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct S(i32);
- mod a {
- pub fn call_foo(s: &super::S) { s.foo(); }
- mod b {
- fn some_method_private_to_b() {
- println!("inside some_method_private_to_b");
- }
- impl super::super::S {
- pub(a) fn foo(&self) {
- some_method_private_to_b();
- println!("only callable within `a`: {}", self.0);
- }
- }
- }
- }
- fn main() { }
Add Comment
Please, Sign In to add comment