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
51b51b51d7931da85280382a81c4dd80c73ca754
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: 4271ms Template: 4ms
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