]> git.lizzy.rs Git - rust.git/blob - tests/ui/definition-reachable/private-types.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / definition-reachable / private-types.rs
1 // Check that type privacy is taken into account when considering reachability
2
3 // check-pass
4
5 #![feature(decl_macro, staged_api)]
6 #![stable(feature = "test", since = "1.0.0")]
7
8 // Type privacy should prevent use of these in other crates, so we shouldn't
9 // need a stability annotation.
10 fn private_function() {}
11 struct PrivateStruct { f: () }
12 enum PrivateEnum { V }
13 union PrivateUnion { g: () }
14 trait PrivateTrait {}
15
16 #[stable(feature = "test", since = "1.0.0")]
17 pub macro m() {}
18
19 fn main() {}