[−][src]Struct rustc_mir_build::thir::pattern::_match::LiteralExpander
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]
&mut self,
val: ConstValue<'tcx>,
rty: Ty<'tcx>,
crty: Ty<'tcx>
) -> ConstValue<'tcx>
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]
fn fold_pattern(&mut self, pat: &Pat<'tcx>) -> Pat<'tcx>[src]
fn fold_pattern_kind(&mut self, kind: &PatKind<'tcx>) -> PatKind<'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]
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,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
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.
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>,