|
| 1 | +// Copyright 2017 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(extern_types)] |
| 12 | + |
| 13 | +mod sub { |
| 14 | + extern { |
| 15 | + /// Another extern type. |
| 16 | + pub type C2; |
| 17 | + pub fn f2(); |
| 18 | + pub static K: usize; |
| 19 | + } |
| 20 | +} |
| 21 | + |
| 22 | +pub mod sub2 { |
| 23 | + extern { |
| 24 | + // @has foreigntype_reexport/sub2/foreigntype.C.html |
| 25 | + pub type C; |
| 26 | + // @has foreigntype_reexport/sub2/fn.f.html |
| 27 | + pub fn f(); |
| 28 | + // @has foreigntype_reexport/sub2/static.K3.html |
| 29 | + pub static K3: usize; |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +mod sub3 { |
| 34 | + extern { |
| 35 | + pub type C4; |
| 36 | + pub fn f4(); |
| 37 | + pub static K4: usize; |
| 38 | + type X4; |
| 39 | + } |
| 40 | +} |
| 41 | + |
| 42 | +// @has foreigntype_reexport/foreigntype.C2.html |
| 43 | +// @has foreigntype_reexport/fn.f2.html |
| 44 | +// @has foreigntype_reexport/static.K2.html |
| 45 | +// @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C2' |
| 46 | +// @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f2' |
| 47 | +// @has foreigntype_reexport/index.html '//a[@class="static"]' 'K2' |
| 48 | +pub use self::sub::{C2, f2, K as K2}; |
| 49 | + |
| 50 | +// @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C' |
| 51 | +// @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f' |
| 52 | +// @has foreigntype_reexport/index.html '//a[@class="static"]' 'K3' |
| 53 | +// @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::C as C3;' |
| 54 | +// @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::f as f3;' |
| 55 | +// @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::K3;' |
| 56 | +pub use self::sub2::{C as C3, f as f3, K3}; |
| 57 | + |
| 58 | +// @has foreigntype_reexport/foreigntype.C4.html |
| 59 | +// @has foreigntype_reexport/fn.f4.html |
| 60 | +// @has foreigntype_reexport/static.K4.html |
| 61 | +// @!has foreigntype_reexport/foreigntype.X4.html |
| 62 | +// @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C4' |
| 63 | +// @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f4' |
| 64 | +// @has foreigntype_reexport/index.html '//a[@class="static"]' 'K4' |
| 65 | +// @!has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'X4' |
| 66 | +pub use self::sub3::*; |
0 commit comments