From 0393037d6e934e86da16a66c2d86166b74a66ba9 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Tue, 6 Mar 2018 19:42:55 +0900 Subject: [PATCH] Add tests for #2398 --- tests/source/visibility.rs | 8 ++++++++ tests/target/visibility.rs | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/source/visibility.rs create mode 100644 tests/target/visibility.rs diff --git a/tests/source/visibility.rs b/tests/source/visibility.rs new file mode 100644 index 00000000000..1c5919ccff9 --- /dev/null +++ b/tests/source/visibility.rs @@ -0,0 +1,8 @@ +// #2398 +pub mod outer_mod { + pub mod inner_mod { + pub ( in outer_mod ) fn outer_mod_visible_fn() {} + pub ( super ) fn super_mod_visible_fn() {} + pub ( self ) fn inner_mod_visible_fn() {} + } +} diff --git a/tests/target/visibility.rs b/tests/target/visibility.rs new file mode 100644 index 00000000000..ca078422c13 --- /dev/null +++ b/tests/target/visibility.rs @@ -0,0 +1,8 @@ +// #2398 +pub mod outer_mod { + pub mod inner_mod { + pub(in outer_mod) fn outer_mod_visible_fn() {} + pub(super) fn super_mod_visible_fn() {} + pub(self) fn inner_mod_visible_fn() {} + } +}