[−][src]Struct rustc_passes::dead::DeadVisitor

pub(in dead) struct DeadVisitor<'tcx> {
    tcx: TyCtxt<'tcx>,
    live_symbols: FxHashSet<HirId>,
}

Fields

tcx: TyCtxt<'tcx>live_symbols: FxHashSet<HirId>

Implementations

impl<'tcx> DeadVisitor<'tcx>[src]

pub(in dead) fn should_warn_about_item(
    &mut self,
    item: &Item<'_>
) -> bool
[src]

pub(in dead) fn should_warn_about_field(
    &mut self,
    field: &StructField<'_>
) -> bool
[src]

pub(in dead) fn should_warn_about_variant(
    &mut self,
    variant: &Variant<'_>
) -> bool
[src]

pub(in dead) fn should_warn_about_foreign_item(
    &mut self,
    fi: &ForeignItem<'_>
) -> bool
[src]

pub(in dead) fn symbol_is_live(
    &mut self,
    id: HirId
) -> bool
[src]

pub(in dead) fn warn_dead_code(
    &mut self,
    id: HirId,
    span: Span,
    name: Symbol,
    participle: &str
)
[src]

Trait Implementations

impl<'tcx> Visitor<'tcx> for DeadVisitor<'tcx>[src]

type Map = Map<'tcx>

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

Walk nested items in place so that we don't report dead-code on inner functions when the outer function is already getting an error. We could do this also by checking the parents, but this is how the code is setup and it seems harmless enough.

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for DeadVisitor<'tcx>

impl<'tcx> !Send for DeadVisitor<'tcx>

impl<'tcx> !Sync for DeadVisitor<'tcx>

impl<'tcx> Unpin for DeadVisitor<'tcx>

impl<'tcx> !UnwindSafe for DeadVisitor<'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.