librustc: Enforce privacy for static methods.

This starts moving a bunch of privacy checks into the privacy
checking phase and out of resolve.
This commit is contained in:
Patrick Walton 2013-03-18 17:20:45 -07:00
parent a14ec73cd2
commit 2e7ec80bcc
18 changed files with 306 additions and 106 deletions

View file

@ -0,0 +1,11 @@
mod a {
pub struct S;
impl S {
static fn new() -> S { S }
}
}
fn main() {
let _ = a::S::new(); //~ ERROR function `new` is private
}