Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/ui/static/static-method-privacy.rs

11 lines
165 B
Rust
Raw Permalink Normal View History

librustc: Enforce privacy for static methods. This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-18 17:20:45 -07:00
mod a {
pub struct S;
impl S {
librustc: Remove all uses of `static` from functions. rs=destatic
2013-03-21 19:07:54 -07:00
fn new() -> S { S }
librustc: Enforce privacy for static methods. This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-18 17:20:45 -07:00
}
}
fn main() {
update tests
2020-03-04 21:03:15 -06:00
let _ = a::S::new(); //~ ERROR associated function `new` is private
librustc: Enforce privacy for static methods. This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-18 17:20:45 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5070ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API