]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/ctor.rs
Auto merge of #106780 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / ui / privacy / ctor.rs
1 // Verify that a type is considered reachable when its constructor is
2 // reachable. The auxiliary library is constructed so that all types are
3 // shadowed and cannot be named directly, while their constructors are
4 // reexported. Regression test for issue #96934.
5 //
6 // aux-build:ctor_aux.rs
7 // edition:2021
8 // build-pass
9
10 extern crate ctor_aux;
11
12 fn main() {
13     ctor_aux::s.f();
14     ctor_aux::x.g();
15     ctor_aux::y.g();
16 }