diff options
Diffstat (limited to 'tests/ui/static/static-method-privacy.rs')
-rw-r--r-- | tests/ui/static/static-method-privacy.rs | 10 |
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 000000000..9ee59b320 --- /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 +} |