pub(crate) struct SearchInterfaceForPrivateItemsVisitor<'tcx> {
    pub(crate) tcx: TyCtxt<'tcx>,
    pub(crate) item_def_id: LocalDefId,
    pub(crate) required_visibility: Visibility,
    pub(crate) has_old_errors: bool,
    pub(crate) 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_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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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