Skip to content

Commit 8196407

Browse files
committed
Auto merge of #73766 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports This PR backports the following: * Make novel structural match violations not a `bug` #73446 * linker: Never pass `-no-pie` to non-gnu linkers #73384 * Disable the `SimplifyArmIdentity` pass #73262 * Allow inference regions when relating consts #73225 * Fix link error with #[thread_local] introduced by #71192 #73065 * Ensure stack when building MIR for matches #72941 * Don't create impl candidates when obligation contains errors #73005 r? @ghost
2 parents 1dc0f6d + 8e8d53f commit 8196407

22 files changed

+5449
-279
lines changed

src/librustc_codegen_ssa/back/linker.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl<'a> Linker for GccLinker<'a> {
280280
fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path) {
281281
match output_kind {
282282
LinkOutputKind::DynamicNoPicExe => {
283-
if !self.is_ld {
283+
if !self.is_ld && self.sess.target.target.options.linker_is_gnu {
284284
self.cmd.arg("-no-pie");
285285
}
286286
}
@@ -291,7 +291,7 @@ impl<'a> Linker for GccLinker<'a> {
291291
LinkOutputKind::StaticNoPicExe => {
292292
// `-static` works for both gcc wrapper and ld.
293293
self.cmd.arg("-static");
294-
if !self.is_ld {
294+
if !self.is_ld && self.sess.target.target.options.linker_is_gnu {
295295
self.cmd.arg("-no-pie");
296296
}
297297
}

src/librustc_middle/ty/relate.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -508,16 +508,7 @@ pub fn super_relate_consts<R: TypeRelation<'tcx>>(
508508
debug!("{}.super_relate_consts(a = {:?}, b = {:?})", relation.tag(), a, b);
509509
let tcx = relation.tcx();
510510

511-
let eagerly_eval = |x: &'tcx ty::Const<'tcx>| {
512-
// FIXME(eddyb) this doesn't account for lifetime inference variables
513-
// being erased by `eval`, *nor* for the polymorphic aspect of `eval`.
514-
// That is, we could always use `eval` and it will just return the
515-
// old value back if it doesn't succeed.
516-
if !x.val.needs_infer() {
517-
return x.eval(tcx, relation.param_env()).val;
518-
}
519-
x.val
520-
};
511+
let eagerly_eval = |x: &'tcx ty::Const<'tcx>| x.eval(tcx, relation.param_env()).val;
521512

522513
// FIXME(eddyb) doesn't look like everything below checks that `a.ty == b.ty`.
523514
// We could probably always assert it early, as `const` generic parameters

src/librustc_mir/monomorphize/collector.rs

+8
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,14 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
586586
self.output.push(create_fn_mono_item(instance));
587587
}
588588
}
589+
mir::Rvalue::ThreadLocalRef(def_id) => {
590+
assert!(self.tcx.is_thread_local_static(def_id));
591+
let instance = Instance::mono(self.tcx, def_id);
592+
if should_monomorphize_locally(self.tcx, &instance) {
593+
trace!("collecting thread-local static {:?}", def_id);
594+
self.output.push(MonoItem::Static(def_id));
595+
}
596+
}
589597
_ => { /* not interesting */ }
590598
}
591599

src/librustc_mir/transform/simplify_try.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ fn optimization_applies<'tcx>(
306306
}
307307

308308
impl<'tcx> MirPass<'tcx> for SimplifyArmIdentity {
309-
fn run_pass(&self, _: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) {
309+
fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) {
310+
if tcx.sess.opts.debugging_opts.mir_opt_level < 2 {
311+
return;
312+
}
313+
310314
trace!("running SimplifyArmIdentity on {:?}", source);
311315
let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
312316
for bb in basic_blocks {

src/librustc_mir_build/build/matches/mod.rs

+25-23
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::build::ForGuard::{self, OutsideGuard, RefWithinGuard};
1010
use crate::build::{BlockAnd, BlockAndExtension, Builder};
1111
use crate::build::{GuardFrame, GuardFrameLocal, LocalsForNode};
1212
use crate::hair::{self, *};
13-
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
13+
use rustc_data_structures::{fx::{FxHashMap, FxHashSet}, stack::ensure_sufficient_stack};
1414
use rustc_hir::HirId;
1515
use rustc_index::bit_set::BitSet;
1616
use rustc_middle::middle::region;
@@ -909,30 +909,32 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
909909
split_or_candidate |= self.simplify_candidate(candidate);
910910
}
911911

912-
if split_or_candidate {
913-
// At least one of the candidates has been split into subcandidates.
914-
// We need to change the candidate list to include those.
915-
let mut new_candidates = Vec::new();
912+
ensure_sufficient_stack(|| {
913+
if split_or_candidate {
914+
// At least one of the candidates has been split into subcandidates.
915+
// We need to change the candidate list to include those.
916+
let mut new_candidates = Vec::new();
916917

917-
for candidate in candidates {
918-
candidate.visit_leaves(|leaf_candidate| new_candidates.push(leaf_candidate));
918+
for candidate in candidates {
919+
candidate.visit_leaves(|leaf_candidate| new_candidates.push(leaf_candidate));
920+
}
921+
self.match_simplified_candidates(
922+
span,
923+
start_block,
924+
otherwise_block,
925+
&mut *new_candidates,
926+
fake_borrows,
927+
);
928+
} else {
929+
self.match_simplified_candidates(
930+
span,
931+
start_block,
932+
otherwise_block,
933+
candidates,
934+
fake_borrows,
935+
);
919936
}
920-
self.match_simplified_candidates(
921-
span,
922-
start_block,
923-
otherwise_block,
924-
&mut *new_candidates,
925-
fake_borrows,
926-
);
927-
} else {
928-
self.match_simplified_candidates(
929-
span,
930-
start_block,
931-
otherwise_block,
932-
candidates,
933-
fake_borrows,
934-
);
935-
};
937+
});
936938
}
937939

938940
fn match_simplified_candidates(

src/librustc_mir_build/hair/pattern/const_to_pat.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,15 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
107107
cv.ty, structural
108108
);
109109

110+
// This can occur because const qualification treats all associated constants as
111+
// opaque, whereas `search_for_structural_match_violation` tries to monomorphize them
112+
// before it runs.
113+
//
114+
// FIXME(#73448): Find a way to bring const qualification into parity with
115+
// `search_for_structural_match_violation`.
110116
if structural.is_none() && mir_structural_match_violation {
111-
bug!("MIR const-checker found novel structural match violation");
117+
warn!("MIR const-checker found novel structural match violation. See #73448.");
118+
return inlined_const_as_pat;
112119
}
113120

114121
if let Some(non_sm_ty) = structural {

src/librustc_trait_selection/traits/select.rs

+18
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
11731173
// who might care about this case, like coherence, should use
11741174
// that function).
11751175
if candidates.is_empty() {
1176+
// If there's an error type, 'downgrade' our result from
1177+
// `Err(Unimplemented)` to `Ok(None)`. This helps us avoid
1178+
// emitting additional spurious errors, since we're guaranteed
1179+
// to have emitted at least one.
1180+
if stack.obligation.references_error() {
1181+
debug!("no results for error type, treating as ambiguous");
1182+
return Ok(None);
1183+
}
11761184
return Err(Unimplemented);
11771185
}
11781186

@@ -1697,6 +1705,16 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
16971705
) -> Result<(), SelectionError<'tcx>> {
16981706
debug!("assemble_candidates_from_impls(obligation={:?})", obligation);
16991707

1708+
// Essentially any user-written impl will match with an error type,
1709+
// so creating `ImplCandidates` isn't useful. However, we might
1710+
// end up finding a candidate elsewhere (e.g. a `BuiltinCandidate` for `Sized)
1711+
// This helps us avoid overflow: see issue #72839
1712+
// Since compilation is already guaranteed to fail, this is just
1713+
// to try to show the 'nicest' possible errors to the user.
1714+
if obligation.references_error() {
1715+
return Ok(());
1716+
}
1717+
17001718
self.tcx().for_each_relevant_impl(
17011719
obligation.predicate.def_id(),
17021720
obligation.predicate.skip_binder().trait_ref.self_ty(),

src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff

+8-9
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@
2626
}
2727

2828
bb3: {
29-
- StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
30-
- _3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
31-
- StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
32-
- _4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
33-
- ((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
34-
- discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
35-
- StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
36-
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:27: 11:28
37-
+ _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
29+
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
30+
_3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
31+
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
32+
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
33+
((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
34+
discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
35+
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
36+
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:27: 11:28
3837
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
3938
}
4039

src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@
2626
}
2727

2828
bb3: {
29-
_0 = move _1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
29+
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
30+
_3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
31+
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
32+
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
33+
((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
34+
discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
35+
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
36+
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:27: 11:28
3037
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
3138
}
3239

src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff

+16-18
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@
2222
}
2323

2424
bb1: {
25-
- StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
26-
- _5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
27-
- StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
28-
- _6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
29-
- ((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
30-
- discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
31-
- StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
32-
- StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:25: 19:26
33-
+ _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
25+
StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
26+
_5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
27+
StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
28+
_6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
29+
((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
30+
discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
31+
StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
32+
StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:25: 19:26
3433
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
3534
}
3635

@@ -39,15 +38,14 @@
3938
}
4039

4140
bb3: {
42-
- StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
43-
- _3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
44-
- StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
45-
- _4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
46-
- ((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
47-
- discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
48-
- StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
49-
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:23: 18:24
50-
+ _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
41+
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
42+
_3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
43+
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
44+
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
45+
((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
46+
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
47+
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
48+
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:23: 18:24
5149
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
5250
}
5351

src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff

+27-16
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,38 @@
1818

1919
bb0: {
2020
_2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
21-
- switchInt(move _2) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
22-
+ goto -> bb1; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
21+
switchInt(move _2) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
2322
}
2423

2524
bb1: {
26-
- _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
27-
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
28-
- }
29-
-
30-
- bb2: {
31-
- unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
32-
- }
33-
-
34-
- bb3: {
35-
_0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
36-
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
37-
+ goto -> bb2; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
25+
StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
26+
_5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
27+
StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
28+
_6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
29+
((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
30+
discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
31+
StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
32+
StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:25: 19:26
33+
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
3834
}
3935

40-
- bb4: {
41-
+ bb2: {
36+
bb2: {
37+
unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
38+
}
39+
40+
bb3: {
41+
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
42+
_3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
43+
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
44+
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
45+
((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
46+
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
47+
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
48+
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:23: 18:24
49+
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
50+
}
51+
52+
bb4: {
4253
return; // scope 0 at $DIR/simplify-arm.rs:21:2: 21:2
4354
}
4455
}

src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyArmIdentity.diff

+9-10
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@
4949
}
5050

5151
bb2: {
52-
- StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
53-
- _10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
54-
- _2 = _10; // scope 5 at $DIR/simplify-arm.rs:24:13: 24:15
55-
- StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:24:14: 24:15
56-
+ _0 = move _3; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
52+
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
53+
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
54+
_2 = _10; // scope 5 at $DIR/simplify-arm.rs:24:13: 24:15
55+
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:24:14: 24:15
5756
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:24:15: 24:16
58-
- StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
59-
- _11 = _2; // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
60-
- ((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
61-
- discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
62-
- StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:25:9: 25:10
57+
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
58+
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
59+
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
60+
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
61+
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:25:9: 25:10
6362
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:26:1: 26:2
6463
goto -> bb5; // scope 0 at $DIR/simplify-arm.rs:26:2: 26:2
6564
}

src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyBranchSame.diff

+9-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,16 @@
4949
}
5050

5151
bb2: {
52-
_0 = move _3; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
52+
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
53+
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:24:13: 24:15
54+
_2 = _10; // scope 5 at $DIR/simplify-arm.rs:24:13: 24:15
55+
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:24:14: 24:15
5356
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:24:15: 24:16
57+
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
58+
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:25:8: 25:9
59+
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
60+
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:25:5: 25:10
61+
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:25:9: 25:10
5462
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:26:1: 26:2
5563
goto -> bb5; // scope 0 at $DIR/simplify-arm.rs:26:2: 26:2
5664
}

0 commit comments

Comments
 (0)