[−][src]Struct rustc_privacy::SearchInterfaceForPrivateItemsVisitor
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_id: HirIditem_def_id: DefIdspan: Spanrequired_visibility: VisibilityThe visitor checks that each component type is at least this visible.
has_pub_restricted: boolhas_old_errors: boolin_assoc_ty: boolImplementations
impl<'tcx> SearchInterfaceForPrivateItemsVisitor<'tcx>[src]
pub(crate) fn generics(&mut self) -> &mut Self[src]
pub(crate) fn predicates(&mut self) -> &mut Self[src]
pub(crate) fn bounds(&mut self) -> &mut Self[src]
pub(crate) fn ty(&mut self) -> &mut Self[src]
pub(crate) fn check_def_id(
&mut self,
def_id: DefId,
kind: &str,
descr: &dyn Display
) -> bool[src]
&mut self,
def_id: DefId,
kind: &str,
descr: &dyn Display
) -> bool
pub(crate) fn leaks_private_dep(&self, item_id: DefId) -> bool[src]
An item is 'leaked' from a private dependency if all of the following are true:
- It's contained within a public type
- It comes from a private crate
Trait Implementations
impl<'tcx> DefIdVisitor<'tcx> for SearchInterfaceForPrivateItemsVisitor<'tcx>[src]
pub(crate) fn tcx(&self) -> TyCtxt<'tcx>[src]
pub(crate) fn visit_def_id(
&mut self,
def_id: DefId,
kind: &str,
descr: &dyn Display
) -> ControlFlow<Self::BreakTy>[src]
&mut self,
def_id: DefId,
kind: &str,
descr: &dyn Display
) -> ControlFlow<Self::BreakTy>
type BreakTy = ()
pub(crate) fn shallow(&self) -> bool[src]
pub(crate) fn skip_assoc_tys(&self) -> bool[src]
pub(crate) fn skeleton(&mut self) -> DefIdVisitorSkeleton<'_, 'tcx, Self>[src]
pub(crate) fn visit(
&mut self,
ty_fragment: impl TypeFoldable<'tcx>
) -> ControlFlow<Self::BreakTy>[src]
&mut self,
ty_fragment: impl TypeFoldable<'tcx>
) -> ControlFlow<Self::BreakTy>
pub(crate) fn visit_trait(
&mut self,
trait_ref: TraitRef<'tcx>
) -> ControlFlow<Self::BreakTy>[src]
&mut self,
trait_ref: TraitRef<'tcx>
) -> ControlFlow<Self::BreakTy>
pub(crate) fn visit_predicates(
&mut self,
predicates: GenericPredicates<'tcx>
) -> ControlFlow<Self::BreakTy>[src]
&mut self,
predicates: GenericPredicates<'tcx>
) -> ControlFlow<Self::BreakTy>
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for SearchInterfaceForPrivateItemsVisitor<'tcx>
impl<'tcx> !Send for SearchInterfaceForPrivateItemsVisitor<'tcx>
impl<'tcx> !Sync for SearchInterfaceForPrivateItemsVisitor<'tcx>
impl<'tcx> Unpin for SearchInterfaceForPrivateItemsVisitor<'tcx>
impl<'tcx> !UnwindSafe for SearchInterfaceForPrivateItemsVisitor<'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,