[−][src]Struct rustc_privacy::ObsoleteVisiblePrivateTypesVisitor

pub(crate) struct ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
    tcx: TyCtxt<'tcx>,
    access_levels: &'a AccessLevels,
    in_variant: bool,
    old_error_set: HirIdSet,
}

Obsolete visitors for checking for private items in public interfaces. These visitors are supposed to be kept in frozen state and produce an "old error node set". For backward compatibility the new visitor reports warnings instead of hard errors when the erroneous node is not in this old set.

Fields

tcx: TyCtxt<'tcx>access_levels: &'a AccessLevelsin_variant: boolold_error_set: HirIdSet

Implementations

impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>[src]

pub(crate) fn path_is_private_type(&self, path: &Path<'_>) -> bool[src]

pub(crate) fn trait_is_public(&self, trait_id: HirId) -> bool[src]

pub(crate) fn check_generic_bound(&mut self, bound: &GenericBound<'_>)[src]

pub(crate) fn item_is_public(&self, id: &HirId, vis: &Visibility<'_>) -> bool[src]

Trait Implementations

impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>[src]

type Map = Map<'tcx>

pub fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map>[src]

We want to visit items in the context of their containing module and so forth, so supply a crate for doing a deep walk.

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> !Send for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> !Sync for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> Unpin for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> !UnwindSafe for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.