]> git.lizzy.rs Git - rust.git/blob - src/test/compile-fail/privacy3.rs
Convert most code to new inner attribute syntax.
[rust.git] / src / test / compile-fail / privacy3.rs
1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![feature(globs)]
12 #![no_std] // makes debugging this test *a lot* easier (during resolve)
13
14 // Test to make sure that private items imported through globs remain private
15 // when  they're used.
16
17 mod bar {
18     pub use self::glob::*;
19
20     mod glob {
21         fn gpriv() {}
22     }
23 }
24
25 pub fn foo() {}
26
27 fn test1() {
28     use bar::gpriv; //~ ERROR: unresolved import
29     //~^ ERROR: failed to resolve
30     gpriv();
31 }
32
33 #[start] fn main(_: int, _: **u8) -> int { 3 }