[−][src]Struct rustc_passes::check_const::CheckConstVisitor

pub(in check_const) struct CheckConstVisitor<'tcx> {
    tcx: TyCtxt<'tcx>,
    const_kind: Option<ConstContext>,
    def_id: Option<LocalDefId>,
}

Fields

tcx: TyCtxt<'tcx>const_kind: Option<ConstContext>def_id: Option<LocalDefId>

Implementations

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

pub(in check_const) fn new(
    tcx: TyCtxt<'tcx>
) -> Self
[src]

pub(in check_const) fn const_check_violated(
    &self,
    expr: NonConstExpr,
    span: Span
)
[src]

Emits an error when an unsupported expression is found in a const context.

pub(in check_const) fn recurse_into(
    &mut self,
    kind: Option<ConstContext>,
    def_id: Option<LocalDefId>,
    f: impl FnOnce(&mut Self)
)
[src]

Saves the parent const_kind before calling f and restores it afterwards.

Trait Implementations

impl<'tcx> Clone for CheckConstVisitor<'tcx>[src]

impl<'tcx> Copy for CheckConstVisitor<'tcx>[src]

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

type Map = Map<'tcx>

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for CheckConstVisitor<'tcx>

impl<'tcx> !UnwindSafe for CheckConstVisitor<'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> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

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.