rust/tests/ui/privacy/pub-priv-dep/shared_indirect.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
677 B
Rust
Raw Normal View History

//@ aux-crate:priv:shared=shared.rs
//@ aux-crate:priv:indirect1=indirect1.rs
//@ compile-flags: -Zunstable-options
//@ check-pass
// A shared dependency, where it is only indirectly public.
//
// shared_indirect
// /\
// (PRIVATE) / | (PRIVATE)
// / |
// indirect1 | |
// (PRIVATE) | |
// indirect2 | |
// \ |
// (public) \ /
// \/
// shared
#![crate_type = "lib"]
#![deny(exported_private_dependencies)]
extern crate shared;
extern crate indirect1;
// FIXME: This should trigger.
pub fn leaks_priv() -> shared::Shared {
shared::Shared
}