Struct rustc_privacy::SearchInterfaceForPrivateItemsVisitor[][src]

pub(crate) struct SearchInterfaceForPrivateItemsVisitor<'tcx> {
    tcx: TyCtxt<'tcx>,
    item_def_id: LocalDefId,
    required_visibility: Visibility,
    has_pub_restricted: bool,
    has_old_errors: bool,
    in_assoc_ty: bool,
}
Expand description

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.

Fields

tcx: TyCtxt<'tcx>item_def_id: LocalDefIdrequired_visibility: Visibility

The visitor checks that each component type is at least this visible.

has_pub_restricted: boolhas_old_errors: boolin_assoc_ty: bool

Implementations

An item is ‘leaked’ from a private dependency if all of the following are true:

  1. It’s contained within a public type
  2. It comes from a private crate

Trait Implementations

type BreakTy = ()

Not overridden, but used to actually visit types and traits.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes