about summary refs log tree commit diff
path: root/tests/ui/privacy/pub-priv-dep/shared_both_private.rs
blob: 20a4b85c01e8db671c647f7128d140f64a68b134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//@ aux-crate:priv:shared=shared.rs
//@ aux-crate:reexport=reexport.rs
//@ compile-flags: -Zunstable-options
//@ check-pass

// A shared dependency, where a private dependency reexports a public dependency.
//
//         shared_both_private
//                  /\
//       (PRIVATE) /  | (PRIVATE)
//                /   |
//        reexport    |
//                \   |
//        (public) \  /
//                  \/
//                shared

#![crate_type = "lib"]
#![deny(exported_private_dependencies)]

extern crate shared;
extern crate reexport;

// FIXME: This should trigger.
pub fn leaks_priv() -> shared::Shared {
    shared::Shared
}

// FIXME: This should trigger.
pub fn leaks_priv_reexport() -> reexport::Shared {
    reexport::Shared
}