[−][src]Struct rustc_mir_build::thir::pattern::_match::LiteralExpander

struct LiteralExpander<'tcx> {
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
}

Fields

tcx: TyCtxt<'tcx>param_env: ParamEnv<'tcx>

Implementations

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

fn fold_const_value_deref(
    &mut self,
    val: ConstValue<'tcx>,
    rty: Ty<'tcx>,
    crty: Ty<'tcx>
) -> ConstValue<'tcx>
[src]

Derefs val and potentially unsizes the value if crty is an array and rty a slice.

crty and rty can differ because you can use array constants in the presence of slice patterns. So the pattern may end up being a slice, but the constant is an array. We convert the array to a slice in that case.

Trait Implementations

impl<'tcx> PatternFolder<'tcx> for LiteralExpander<'tcx>[src]

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for LiteralExpander<'tcx>

impl<'tcx> !UnwindSafe for LiteralExpander<'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<'a, T> Captures<'a> 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.