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

14 lines
239 B
Rust
Raw Normal View History

rustc: Improve errors on private static methods This gives a better NOTE error message when a privacy error is encountered with a static method. Previously no note was emitted (due to lack of support), but now a note is emitted indicating that the struct/enum itself is private. Closes #13641
2014-04-20 12:07:15 -07:00
mod a {
struct Foo;
impl Foo { pub fn new() {} }
enum Bar {}
impl Bar { pub fn new() {} }
}
fn main() {
a::Foo::new();
Fix fallout in tests
2016-02-22 22:33:38 +00:00
//~^ ERROR: struct `Foo` is private
rustc: Improve errors on private static methods This gives a better NOTE error message when a privacy error is encountered with a static method. Previously no note was emitted (due to lack of support), but now a note is emitted indicating that the struct/enum itself is private. Closes #13641
2014-04-20 12:07:15 -07:00
a::Bar::new();
Fix fallout in tests
2016-02-22 22:33:38 +00:00
//~^ ERROR: enum `Bar` is private
rustc: Improve errors on private static methods This gives a better NOTE error message when a privacy error is encountered with a static method. Previously no note was emitted (due to lack of support), but now a note is emitted indicating that the struct/enum itself is private. Closes #13641
2014-04-20 12:07:15 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5114ms Template: 3ms
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