summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/issue-29161.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/issue-29161.rs')
-rw-r--r--tests/ui/privacy/issue-29161.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/privacy/issue-29161.rs b/tests/ui/privacy/issue-29161.rs
new file mode 100644
index 000000000..d80405aa8
--- /dev/null
+++ b/tests/ui/privacy/issue-29161.rs
@@ -0,0 +1,15 @@
+mod a {
+ struct A;
+
+ impl Default for A {
+ pub fn default() -> A { //~ ERROR unnecessary visibility qualifier
+ A
+ }
+ }
+}
+
+
+fn main() {
+ a::A::default();
+ //~^ ERROR struct `A` is private
+ }