]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/privacy4.rs
Rollup merge of #86747 - FabianWolff:issue-86653, r=GuillaumeGomez
[rust.git] / src / test / ui / privacy / privacy4.rs
1 #![feature(lang_items, start, no_core)]
2 #![no_core] // makes debugging this test *a lot* easier (during resolve)
3
4 #[lang = "sized"] pub trait Sized {}
5 #[lang="copy"] pub trait Copy {}
6
7 // Test to make sure that private items imported through globs remain private
8 // when  they're used.
9
10 mod bar {
11     pub use self::glob::*;
12
13     mod glob {
14         fn gpriv() {}
15     }
16 }
17
18 pub fn foo() {}
19
20 fn test2() {
21     use bar::glob::gpriv; //~ ERROR: module `glob` is private
22     gpriv();
23 }
24
25 #[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }