Enum rustc_mir_build::build::matches::TestKind [−][src]
enum TestKind<'tcx> {
Switch {
adt_def: &'tcx AdtDef,
variants: BitSet<VariantIdx>,
},
SwitchInt {
switch_ty: Ty<'tcx>,
options: FxIndexMap<&'tcx Const<'tcx>, u128>,
},
Eq {
value: &'tcx Const<'tcx>,
ty: Ty<'tcx>,
},
Range(PatRange<'tcx>),
Len {
len: u64,
op: BinOp,
},
}Expand description
See Test for more.
Variants
Expand description
Test what enum variant a value is.
Show fields
Fields of Switch
adt_def: &'tcx AdtDefExpand description
The enum type being tested.
variants: BitSet<VariantIdx>Expand description
The set of variants that we should create a branch for. We also create an additional “otherwise” case.
Expand description
Test what value an integer, bool, or char has.
Show fields
Fields of SwitchInt
switch_ty: Ty<'tcx>Expand description
The type of the value that we’re testing.
options: FxIndexMap<&'tcx Const<'tcx>, u128>Expand description
The (ordered) set of values that we test for.
For integers and chars we create a branch to each of the values in
options, as well as an “otherwise” branch for all other values, even
in the (rare) case that options is exhaustive.
For bool we always generate two edges, one for true and one for
false.
Expand description
Test for equality with value, possibly after an unsizing coercion to
ty,
Range(PatRange<'tcx>)Expand description
Test whether the value falls within an inclusive or exclusive range
Expand description
Test that the length of the slice is equal to len.
Trait Implementations
impl<'tcx> StructuralPartialEq for TestKind<'tcx>[src]
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for TestKind<'tcx>
impl<'tcx> !Send for TestKind<'tcx>
impl<'tcx> !Sync for TestKind<'tcx>
impl<'tcx> Unpin for TestKind<'tcx>
impl<'tcx> !UnwindSafe for TestKind<'tcx>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,