2024-03-17 15:46:40 -07:00
|
|
|
//@ aux-crate:priv:shared=shared.rs
|
|
|
|
|
//@ aux-crate:priv:indirect1=indirect1.rs
|
|
|
|
|
//@ compile-flags: -Zunstable-options
|
|
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
|
|
|
|
|
pub fn leaks_priv() -> shared::Shared {
|
2025-01-28 23:20:36 +00:00
|
|
|
//~^ ERROR type `Shared` from private dependency 'shared' in public interface
|
2024-03-17 15:46:40 -07:00
|
|
|
shared::Shared
|
|
|
|
|
}
|