summaryrefslogtreecommitdiffstats
path: root/src/test/ui/privacy/issue-13641.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/privacy/issue-13641.rs')
-rw-r--r--src/test/ui/privacy/issue-13641.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/privacy/issue-13641.rs b/src/test/ui/privacy/issue-13641.rs
new file mode 100644
index 000000000..198cea428
--- /dev/null
+++ b/src/test/ui/privacy/issue-13641.rs
@@ -0,0 +1,13 @@
+mod a {
+ struct Foo;
+ impl Foo { pub fn new() {} }
+ enum Bar {}
+ impl Bar { pub fn new() {} }
+}
+
+fn main() {
+ a::Foo::new();
+ //~^ ERROR: struct `Foo` is private
+ a::Bar::new();
+ //~^ ERROR: enum `Bar` is private
+}