summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/restricted/private-in-public.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/restricted/private-in-public.rs')
-rw-r--r--tests/ui/privacy/restricted/private-in-public.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/privacy/restricted/private-in-public.rs b/tests/ui/privacy/restricted/private-in-public.rs
new file mode 100644
index 000000000..1e3dbdf73
--- /dev/null
+++ b/tests/ui/privacy/restricted/private-in-public.rs
@@ -0,0 +1,11 @@
+mod foo {
+ struct Priv;
+ mod bar {
+ use foo::Priv;
+ pub(super) fn f(_: Priv) {}
+ pub(crate) fn g(_: Priv) {} //~ ERROR E0446
+ pub(crate) fn h(_: Priv) {} //~ ERROR E0446
+ }
+}
+
+fn main() { }