[−][src]Struct rustc_mir_build::thir::pattern::_match::MatchCheckCtxt
Fields
tcx: TyCtxt<'tcx>module: DefIdThe module in which the match occurs. This is necessary for
checking inhabited-ness of types because whether a type is (visibly)
inhabited can depend on whether it was defined in the current module or
not. E.g., struct Foo { _private: ! } cannot be seen to be empty
outside it's module and should not be matchable with an empty match
statement.
param_env: ParamEnv<'tcx>pattern_arena: &'a TypedArena<Pat<'tcx>>Implementations
impl<'a, 'tcx> MatchCheckCtxt<'a, 'tcx>[src]
pub(in thir::pattern::_match) fn is_uninhabited(
&self,
ty: Ty<'tcx>
) -> bool[src]
&self,
ty: Ty<'tcx>
) -> bool
pub(in thir::pattern::_match) fn is_foreign_non_exhaustive_enum(
&self,
ty: Ty<'tcx>
) -> bool[src]
&self,
ty: Ty<'tcx>
) -> bool
Returns whether the given type is an enum from another crate declared #[non_exhaustive].
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for MatchCheckCtxt<'a, 'tcx>
impl<'a, 'tcx> !Send for MatchCheckCtxt<'a, 'tcx>
impl<'a, 'tcx> !Sync for MatchCheckCtxt<'a, 'tcx>
impl<'a, 'tcx> Unpin for MatchCheckCtxt<'a, 'tcx> where
'tcx: 'a,
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for MatchCheckCtxt<'a, '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,
pub 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.
pub 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>,