File: ref_of_deref.pointers.InstSimplify-after-simplifycfg.diff

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (58 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (3)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
- // MIR for `pointers` before InstSimplify-after-simplifycfg
+ // MIR for `pointers` after InstSimplify-after-simplifycfg
  
  fn pointers(_1: *const [i32], _2: *mut i32) -> () {
      debug const_ptr => _1;
      debug mut_ptr => _2;
      let mut _0: ();
      let _3: &[i32];
      scope 1 {
          debug _a => _3;
          let _4: &i32;
          scope 2 {
              debug _b => _4;
              let _5: &mut i32;
              scope 3 {
                  debug _c => _5;
                  let _6: *const [i32];
                  scope 4 {
                      debug _d => _6;
                      let _7: *const i32;
                      scope 5 {
                          debug _e => _7;
                          let _8: *mut i32;
                          scope 6 {
                              debug _f => _8;
                          }
                      }
                  }
              }
          }
      }
  
      bb0: {
          StorageLive(_3);
          _3 = &(*_1);
          StorageLive(_4);
          _4 = &(*_2);
          StorageLive(_5);
          _5 = &mut (*_2);
          StorageLive(_6);
-         _6 = &raw const (*_1);
+         _6 = copy _1;
          StorageLive(_7);
          _7 = &raw const (*_2);
          StorageLive(_8);
-         _8 = &raw mut (*_2);
+         _8 = copy _2;
          _0 = const ();
          StorageDead(_8);
          StorageDead(_7);
          StorageDead(_6);
          StorageDead(_5);
          StorageDead(_4);
          StorageDead(_3);
          return;
      }
  }