Skip to content

Commit 0393037

Browse files
committed
Add tests for #2398
1 parent 3fc8bb1 commit 0393037

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/visibility.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// #2398
2+
pub mod outer_mod {
3+
pub mod inner_mod {
4+
pub ( in outer_mod ) fn outer_mod_visible_fn() {}
5+
pub ( super ) fn super_mod_visible_fn() {}
6+
pub ( self ) fn inner_mod_visible_fn() {}
7+
}
8+
}

tests/target/visibility.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// #2398
2+
pub mod outer_mod {
3+
pub mod inner_mod {
4+
pub(in outer_mod) fn outer_mod_visible_fn() {}
5+
pub(super) fn super_mod_visible_fn() {}
6+
pub(self) fn inner_mod_visible_fn() {}
7+
}
8+
}

0 commit comments

Comments
 (0)