about summary refs log tree commit diff
path: root/tests/ui/static/static-method-privacy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/static/static-method-privacy.rs')
-rw-r--r--tests/ui/static/static-method-privacy.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/static/static-method-privacy.rs b/tests/ui/static/static-method-privacy.rs
new file mode 100644
index 00000000000..9ee59b320ed
--- /dev/null
+++ b/tests/ui/static/static-method-privacy.rs
@@ -0,0 +1,10 @@
+mod a {
+    pub struct S;
+    impl S {
+        fn new() -> S { S }
+    }
+}
+
+fn main() {
+    let _ = a::S::new();    //~ ERROR associated function `new` is private
+}