summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff
blob: 4a655604cd183076de1d50e7c389553dba194f15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- // MIR for `generic` before ConstProp
+ // MIR for `generic` after ConstProp
  
  fn generic() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/offset_of.rs:+0:17: +0:17
      let _1: usize;                       // in scope 0 at $DIR/offset_of.rs:+1:9: +1:11
      scope 1 {
          debug gx => _1;                  // in scope 1 at $DIR/offset_of.rs:+1:9: +1:11
          let _2: usize;                   // in scope 1 at $DIR/offset_of.rs:+2:9: +2:11
          scope 2 {
              debug gy => _2;              // in scope 2 at $DIR/offset_of.rs:+2:9: +2:11
              let _3: usize;               // in scope 2 at $DIR/offset_of.rs:+3:9: +3:11
              scope 3 {
                  debug dx => _3;          // in scope 3 at $DIR/offset_of.rs:+3:9: +3:11
                  let _4: usize;           // in scope 3 at $DIR/offset_of.rs:+4:9: +4:11
                  scope 4 {
                      debug dy => _4;      // in scope 4 at $DIR/offset_of.rs:+4:9: +4:11
                  }
              }
          }
      }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/offset_of.rs:+1:9: +1:11
          _1 = OffsetOf(Gamma<T>, [0]);    // scope 0 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
          StorageLive(_2);                 // scope 1 at $DIR/offset_of.rs:+2:9: +2:11
          _2 = OffsetOf(Gamma<T>, [1]);    // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
          StorageLive(_3);                 // scope 2 at $DIR/offset_of.rs:+3:9: +3:11
          _3 = OffsetOf(Delta<T>, [1]);    // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
          StorageLive(_4);                 // scope 3 at $DIR/offset_of.rs:+4:9: +4:11
          _4 = OffsetOf(Delta<T>, [2]);    // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
          _0 = const ();                   // scope 0 at $DIR/offset_of.rs:+0:17: +5:2
          StorageDead(_4);                 // scope 3 at $DIR/offset_of.rs:+5:1: +5:2
          StorageDead(_3);                 // scope 2 at $DIR/offset_of.rs:+5:1: +5:2
          StorageDead(_2);                 // scope 1 at $DIR/offset_of.rs:+5:1: +5:2
          StorageDead(_1);                 // scope 0 at $DIR/offset_of.rs:+5:1: +5:2
          return;                          // scope 0 at $DIR/offset_of.rs:+5:2: +5:2
      }
  }