]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff
Do not eagerly recover for bad impl-trait in macros
[rust.git] / tests / mir-opt / early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff
1 - // MIR for `no_downcast` before EarlyOtherwiseBranch
2 + // MIR for `no_downcast` after EarlyOtherwiseBranch
3   
4   fn no_downcast(_1: &E<'_>) -> u32 {
5       debug e => _1;                       // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:16: +0:17
6       let mut _0: u32;                     // return place in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:26: +0:29
7       let mut _2: isize;                   // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:20: +1:30
8       let mut _3: isize;                   // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
9       let mut _4: &E<'_>;                  // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:16: +0:17
10       scope 1 {
11       }
12   
13       bb0: {
14           _3 = discriminant((*_1));        // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
15           switchInt(move _3) -> [1: bb1, otherwise: bb3]; // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
16       }
17   
18       bb1: {
19           _4 = deref_copy (((*_1) as Some).0: &E<'_>); // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
20           _2 = discriminant((*_4));        // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
21           switchInt(move _2) -> [1: bb2, otherwise: bb3]; // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
22       }
23   
24       bb2: {
25           _0 = const 1_u32;                // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:38: +1:39
26           goto -> bb4;                     // scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:5: +1:52
27       }
28   
29       bb3: {
30           _0 = const 2_u32;                // scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:49: +1:50
31           goto -> bb4;                     // scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:5: +1:52
32       }
33   
34       bb4: {
35           return;                          // scope 0 at $DIR/early_otherwise_branch_soundness.rs:+2:2: +2:2
36       }
37   }
38