File: uninhabited_enum_branching.simple.UninhabitedEnumBranching.panic-unwind.diff

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (53 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (2)
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
- // MIR for `simple` before UninhabitedEnumBranching
+ // MIR for `simple` after UninhabitedEnumBranching
  
  fn simple() -> () {
      let mut _0: ();
      let _1: &str;
      let mut _2: Test1;
      let mut _3: isize;
      let _4: &str;
      let _5: &str;
  
      bb0: {
          StorageLive(_1);
          StorageLive(_2);
          _2 = Test1::C;
          _3 = discriminant(_2);
-         switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb2, otherwise: bb1];
+         switchInt(move _3) -> [0: bb1, 1: bb1, 2: bb2, otherwise: bb1];
      }
  
      bb1: {
          unreachable;
      }
  
      bb2: {
          StorageLive(_5);
          _5 = const "C";
          _1 = &(*_5);
          StorageDead(_5);
          goto -> bb5;
      }
  
      bb3: {
          _1 = const "A(Empty)";
          goto -> bb5;
      }
  
      bb4: {
          StorageLive(_4);
          _4 = const "B(Empty)";
          _1 = &(*_4);
          StorageDead(_4);
          goto -> bb5;
      }
  
      bb5: {
          StorageDead(_2);
          StorageDead(_1);
          _0 = const ();
          return;
      }
  }