Modulesยง
- errors ๐
Structsยง
- Embargo
Visitor ๐The embargo visitor, used to determine the exports of the AST. - FindMin ๐Visitor used to determine impl visibility and reachability.
- Lazy
DefPath ๐Str Generic infrastructure used to implement specific visitors below. - Name
Privacy ๐Visitor Name privacy visitor, checks privacy and reports violations. Most of name privacy checks are performed during the main resolution phase, or later in type checking when field accesses and associated items are resolved. This pass performs remaining checks for fields in struct expressions and patterns. - SearchInterfaceForPrivateItemsVisitor traverses an itemโs interface and finds any private components in it. PrivateItemsInPublicInterfacesVisitor ensures there are no private types and traits in public interfaces.
- Visitor, used for EffectiveVisibilities table checking
- Type
Privacy ๐Visitor Type privacy visitor, checks types for privacy and reports violations. Both explicitly written types and inferred types of expressions and patterns are checked. Checks are performed on โsemanticโ types regardless of names and their hygiene.
Staticsยง
- Raw content of Fluent resource for this crate, generated by
fluent_messages
macro, imported byrustc_driver
to include all cratesโ resources in one bundle.
Traitsยง
- Implemented to visit all
DefId
s in a type. VisitingDefId
s 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 overridablefn visit_trait_ref
, so we have to catch traitDefId
s manually. Second, it doesnโt visit some type components like signatures of fn types, or traits inimpl Trait
, see individual comments inDefIdVisitorSkeleton::visit_ty
. - Visibility
Like ๐
Functionsยง
- check_
mod_ ๐privacy - min ๐