fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB48 linesraw
1- // MIR for `option_payload` before LowerIntrinsics
2+ // MIR for `option_payload` after LowerIntrinsics
3  
4  fn option_payload(_1: &Option<usize>, _2: &Option<String>) -> () {
5      debug o => _1;
6      debug p => _2;
7      let mut _0: ();
8      let mut _4: *const std::option::Option<usize>;
9      let mut _6: *const std::option::Option<std::string::String>;
10      scope 1 {
11          let _3: *const usize;
12          scope 2 {
13              debug _x => _3;
14              let _5: *const std::string::String;
15              scope 3 {
16                  debug _y => _5;
17              }
18          }
19      }
20  
21      bb0: {
22          StorageLive(_3);
23          StorageLive(_4);
24          _4 = &raw const (*_1);
25-         _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable];
26+         _3 = &raw const (((*_4) as Some).0: usize);
27+         goto -> bb1;
28      }
29  
30      bb1: {
31          StorageDead(_4);
32          StorageLive(_5);
33          StorageLive(_6);
34          _6 = &raw const (*_2);
35-         _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable];
36+         _5 = &raw const (((*_6) as Some).0: std::string::String);
37+         goto -> bb2;
38      }
39  
40      bb2: {
41          StorageDead(_6);
42          _0 = const ();
43          StorageDead(_5);
44          StorageDead(_3);
45          return;
46      }
47  }
48