Skip to main content

Crate rustc_privacy

Crate rustc_privacy 

Source

ModulesΒ§

errors πŸ”’

StructsΒ§

DefIdVisitorSkeleton
EmbargoVisitor πŸ”’
The embargo visitor, used to determine the exports of the AST.
FindMin πŸ”’
Visitor used to determine impl visibility and reachability.
LazyDefPathStr πŸ”’
NamePrivacyVisitor πŸ”’
Name privacy visitor, checks privacy and reports violations.
PrivateItemsInPublicInterfacesChecker πŸ”’
ReachEverythingInTheInterfaceVisitor πŸ”’
SearchInterfaceForPrivateItemsVisitor πŸ”’
SearchInterfaceForPrivateItemsVisitor traverses an item’s interface and finds any private components in it.
TestReachabilityVisitor
Visitor, used for EffectiveVisibilities table checking
TypePrivacyVisitor πŸ”’
Type privacy visitor, checks types for privacy and reports violations.

StaticsΒ§

DEFAULT_LOCALE_RESOURCE
Raw content of Fluent resource for this crate, generated by fluent_messages macro, imported by rustc_driver to include all crates’ resources in one bundle.

TraitsΒ§

DefIdVisitor
Implemented to visit all DefIds in a type. Visiting DefIds is useful because visibilities and reachabilities are attached to them. The idea is to visit β€œall components of a type”, as documented in https://github.com/rust-lang/rfcs/blob/master/text/2145-type-privacy.md#how-to-determine-visibility-of-a-type. The default type visitor (TypeVisitor) does most of the job, but it has some shortcomings. First, it doesn’t have overridable fn visit_trait_ref, so we have to catch trait DefIds manually. Second, it doesn’t visit some type components like signatures of fn types, or traits in impl Trait, see individual comments in DefIdVisitorSkeleton::visit_ty.
VisibilityLike πŸ”’

FunctionsΒ§

assoc_has_type_of πŸ”’
check_mod_privacy πŸ”’
check_private_in_public πŸ”’
effective_visibilities πŸ”’
min πŸ”’
provide