We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02b4d3d commit 2fe2488Copy full SHA for 2fe2488
src/librustc_trans/mir/place.rs
@@ -359,10 +359,10 @@ impl<'a, 'tcx> PlaceRef<'tcx> {
359
/// Set the discriminant for a new value of the given case of the given
360
/// representation.
361
pub fn trans_set_discr(&self, bcx: &Builder<'a, 'tcx>, variant_index: usize) {
362
- if self.layout.for_variant(bcx.ccx, variant_index).abi == layout::Abi::Uninhabited {
363
- return;
364
- }
365
- match self.layout.variants {
+ if self.layout.for_variant(bcx.ccx, variant_index).abi == layout::Abi::Uninhabited {
+ return;
+ }
+ match self.layout.variants {
366
layout::Variants::Single { index } => {
367
assert_eq!(index, variant_index);
368
}
0 commit comments