Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. // MIR for `id_option`
  2. // node_id = 4
  3. // pass_name = CopyPropagation
  4. // disambiguator = after
  5.  
  6. fn id_option(_1: std::option::Option<u32>) -> std::option::Option<u32> {
  7. let mut _0: std::option::Option<u32>; // return pointer
  8. scope 1 {
  9. let _2: std::option::Option<u32>; // "a" in scope 1 at id.rs:6:18: 6:19
  10. scope 2 {
  11. let _3: u32; // "x" in scope 2 at id.rs:8:14: 8:15
  12. }
  13. }
  14. let mut _4: u32;
  15.  
  16. bb0: {
  17. StorageLive(_2); // scope 0 at id.rs:6:18: 6:19
  18. _2 = _1; // scope 0 at id.rs:6:18: 6:19
  19. switch(_2) -> [None: bb1, Some: bb2]; // scope 1 at id.rs:8:9: 8:16
  20. }
  21.  
  22. bb1: {
  23. _0 = std::option::Option<u32>::None; // scope 1 at id.rs:9:17: 9:21
  24. goto -> bb3; // scope 1 at id.rs:7:5: 10:6
  25. }
  26.  
  27. bb2: {
  28. nop; // scope 1 at id.rs:8:14: 8:15
  29. nop; // scope 1 at id.rs:8:14: 8:15
  30. nop; // scope 2 at id.rs:8:25: 8:26
  31. nop; // scope 2 at id.rs:8:25: 8:26
  32. _0 = _2; // scope 2 at id.rs:8:20: 8:27
  33. nop; // scope 2 at id.rs:8:27: 8:27
  34. goto -> bb3; // scope 1 at id.rs:7:5: 10:6
  35. }
  36.  
  37. bb3: {
  38. nop; // scope 1 at id.rs:10:6: 10:6
  39. StorageDead(_2); // scope 0 at id.rs:11:2: 11:2
  40. return; // scope 1 at id.rs:11:2: 11:2
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement