]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/simplify_match.main.ConstProp.diff
Test drop_tracking_mir before querying generator.
[rust.git] / tests / mir-opt / simplify_match.main.ConstProp.diff
1 - // MIR for `main` before ConstProp
2 + // MIR for `main` after ConstProp
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify_match.rs:+0:11: +0:11
6       let mut _1: bool;                    // in scope 0 at $DIR/simplify_match.rs:+1:11: +1:31
7       let _2: bool;                        // in scope 0 at $DIR/simplify_match.rs:+1:17: +1:18
8       scope 1 {
9           debug x => _2;                   // in scope 1 at $DIR/simplify_match.rs:+1:17: +1:18
10       }
11   
12       bb0: {
13           StorageLive(_1);                 // scope 0 at $DIR/simplify_match.rs:+1:11: +1:31
14           StorageLive(_2);                 // scope 0 at $DIR/simplify_match.rs:+1:17: +1:18
15           _2 = const false;                // scope 0 at $DIR/simplify_match.rs:+1:21: +1:26
16 -         _1 = _2;                         // scope 1 at $DIR/simplify_match.rs:+1:28: +1:29
17 +         _1 = const false;                // scope 1 at $DIR/simplify_match.rs:+1:28: +1:29
18           StorageDead(_2);                 // scope 0 at $DIR/simplify_match.rs:+1:30: +1:31
19 -         switchInt(_1) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:+1:5: +1:31
20 +         switchInt(const false) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:+1:5: +1:31
21       }
22   
23       bb1: {
24           goto -> bb3;                     // scope 0 at $DIR/simplify_match.rs:+3:18: +3:20
25       }
26   
27       bb2: {
28           _0 = noop() -> bb3;              // scope 0 at $DIR/simplify_match.rs:+2:17: +2:23
29                                            // mir::Constant
30                                            // + span: $DIR/simplify_match.rs:7:17: 7:21
31                                            // + literal: Const { ty: fn() {noop}, val: Value(<ZST>) }
32       }
33   
34       bb3: {
35           StorageDead(_1);                 // scope 0 at $DIR/simplify_match.rs:+5:1: +5:2
36           return;                          // scope 0 at $DIR/simplify_match.rs:+5:2: +5:2
37       }
38   }
39