summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/legacy-ctor-visibility.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/legacy-ctor-visibility.rs')
-rw-r--r--tests/ui/privacy/legacy-ctor-visibility.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/privacy/legacy-ctor-visibility.rs b/tests/ui/privacy/legacy-ctor-visibility.rs
new file mode 100644
index 000000000..5732b6446
--- /dev/null
+++ b/tests/ui/privacy/legacy-ctor-visibility.rs
@@ -0,0 +1,15 @@
+use m::S;
+
+mod m {
+ pub struct S(u8);
+
+ mod n {
+ use S;
+ fn f() {
+ S(10);
+ //~^ ERROR expected function, tuple struct or tuple variant, found struct `S`
+ }
+ }
+}
+
+fn main() {}