3
3
fn foo(_1 : Option<String>) -> i32 {
4
4
debug s => _1; // in scope 0 at $DIR/string.rs:+0:12 : +0:13
5
5
let mut _0 : i32; // return place in scope 0 at $DIR/string.rs:+0:34: +0:37
6
- let mut _2 : &std::string::String ; // in scope 0 at $DIR/string.rs:+2:14 : +2:17
7
- let mut _3 : &str ; // in scope 0 at $DIR/string.rs:+2:14 : +2:17
8
- let mut _4 : bool; // in scope 0 at $DIR/string.rs:+2:14: +2:17
9
- let mut _5 : isize ; // in scope 0 at $DIR/string.rs:+2:9 : +2:18
10
- let _6 : std::option::Option<std::string::String>; // in scope 0 at $DIR/string.rs:+3:9 : +3:10
11
- let mut _7 : bool; // in scope 0 at $DIR/string.rs:+5:1 : +5:2
6
+ let mut _2 : bool ; // in scope 0 at $DIR/string.rs:+5:1 : +5:2
7
+ let mut _3 : isize ; // in scope 0 at $DIR/string.rs:+2:9 : +2:18
8
+ let mut _4 : &std::string::String; // in scope 0 at $DIR/string.rs:+2:14: +2:17
9
+ let mut _5 : &str ; // in scope 0 at $DIR/string.rs:+2:14 : +2:17
10
+ let mut _6 : bool; // in scope 0 at $DIR/string.rs:+2:14 : +2:17
11
+ let _7 : std::option::Option<std::string::String>; // in scope 0 at $DIR/string.rs:+3:9 : +3:10
12
12
scope 1 {
13
- debug s => _6 ; // in scope 1 at $DIR/string.rs:+3:9 : +3:10
13
+ debug s => _7 ; // in scope 1 at $DIR/string.rs:+3:9 : +3:10
14
14
}
15
15
16
16
bb0 : {
17
- _7 = const false; // scope 0 at $DIR/string.rs:+1:11 : +1:12
18
- _7 = const true; // scope 0 at $DIR/string.rs:+1:11 : +1:12
19
- _5 = discriminant(_1); // scope 0 at $DIR/string.rs:+1:11 : +1:12
20
- switchInt(move _5 ) -> [1 : bb2 , otherwise: bb1 ]; // scope 0 at $DIR/string.rs:+1:5: +1:12
17
+ _2 = const false; // scope 0 at $DIR/string.rs:+1:11 : +1:12
18
+ _2 = const true; // scope 0 at $DIR/string.rs:+1:11 : +1:12
19
+ _3 = discriminant(_1); // scope 0 at $DIR/string.rs:+1:11 : +1:12
20
+ switchInt(move _3 ) -> [1 : bb1 , otherwise: bb5 ]; // scope 0 at $DIR/string.rs:+1:5: +1:12
21
21
}
22
22
23
23
bb1 : {
24
- StorageLive(_6); // scope 0 at $DIR/string.rs:+3:9 : +3:10
25
- _7 = const false; // scope 0 at $DIR/string.rs:+3:9 : +3:10
26
- _6 = move _1; // scope 0 at $DIR/string.rs:+3:9 : +3:10
27
- _0 = const 4321_i32; // scope 1 at $DIR/string.rs:+3:14 : +3:18
28
- drop(_6) -> [return : bb6, unwind unreachable]; // scope 0 at $DIR/string.rs:+3:17: +3:18
29
- }
30
-
31
- bb2 : {
32
- _2 = &((_1 as Some).0 : std::string::String); // scope 0 at $DIR/string.rs:+2:14: +2:17
33
- _3 = <String as Deref>::deref(move _2) -> [return : bb3, unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
24
+ _4 = &((_1 as Some).0 : std::string::String); // scope 0 at $DIR/string.rs:+2:14: +2:17
25
+ _5 = <String as Deref>::deref(move _4) -> [return : bb2, unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
34
26
// mir::Constant
35
27
// + span : $DIR/string.rs:9:14: 9:17
36
28
// + literal : Const { ty: for<'a> fn(&'a String) -> &'a <String as Deref>::Target {<String as Deref>::deref}, val: Value(<ZST>) }
37
29
}
38
30
39
- bb3 : {
40
- _4 = <str as PartialEq>::eq(_3 , const "a") -> [return : bb4 , unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
31
+ bb2 : {
32
+ _6 = <str as PartialEq>::eq(_5 , const "a") -> [return : bb3 , unwind unreachable]; // scope 0 at $DIR/string.rs:+2:14: +2:17
41
33
// mir::Constant
42
34
// + span : $DIR/string.rs:9:14: 9:17
43
35
// + literal : Const { ty: for<'a, 'b> fn(&'a str, &'b str) -> bool {<str as PartialEq>::eq}, val: Value(<ZST>) }
@@ -46,29 +38,37 @@ fn foo(_1: Option<String>) -> i32 {
46
38
// + literal : Const { ty: &str, val: Value(Slice(..)) }
47
39
}
48
40
41
+ bb3 : {
42
+ switchInt(move _6) -> [0 : bb5, otherwise: bb4]; // scope 0 at $DIR/string.rs:+2:14: +2:17
43
+ }
44
+
49
45
bb4 : {
50
- switchInt(move _4) -> [0 : bb1, otherwise: bb5]; // scope 0 at $DIR/string.rs:+2:14: +2:17
46
+ _0 = const 1234_i32; // scope 0 at $DIR/string.rs:+2:22 : +2:26
47
+ goto -> bb7; // scope 0 at $DIR/string.rs:+2:22 : +2:26
51
48
}
52
49
53
50
bb5 : {
54
- _0 = const 1234_i32; // scope 0 at $DIR/string.rs:+2:22 : +2:26
55
- goto -> bb9; // scope 0 at $DIR/string.rs:+2:22 : +2:26
51
+ StorageLive(_7); // scope 0 at $DIR/string.rs:+3:9 : +3:10
52
+ _2 = const false; // scope 0 at $DIR/string.rs:+3:9 : +3:10
53
+ _7 = move _1; // scope 0 at $DIR/string.rs:+3:9 : +3:10
54
+ _0 = const 4321_i32; // scope 1 at $DIR/string.rs:+3:14 : +3:18
55
+ drop(_7) -> [return : bb6, unwind unreachable]; // scope 0 at $DIR/string.rs:+3:17: +3:18
56
56
}
57
57
58
58
bb6 : {
59
- StorageDead(_6 ); // scope 0 at $DIR/string.rs:+3:17 : +3:18
60
- goto -> bb9 ; // scope 0 at $DIR/string.rs:+3:17 : +3:18
59
+ StorageDead(_7 ); // scope 0 at $DIR/string.rs:+3:17 : +3:18
60
+ goto -> bb7 ; // scope 0 at $DIR/string.rs:+3:17 : +3:18
61
61
}
62
62
63
63
bb7 : {
64
- return; // scope 0 at $DIR/string.rs:+5:2 : +5:2
64
+ switchInt(_2) -> [0 : bb9, otherwise: bb8]; // scope 0 at $DIR/string.rs:+5:1 : +5:2
65
65
}
66
66
67
67
bb8 : {
68
- drop(_1) -> [return : bb7 , unwind unreachable]; // scope 0 at $DIR/string.rs:+5:1: +5:2
68
+ drop(_1) -> [return : bb9 , unwind unreachable]; // scope 0 at $DIR/string.rs:+5:1: +5:2
69
69
}
70
70
71
71
bb9 : {
72
- switchInt(_7) -> [0 : bb7, otherwise: bb8]; // scope 0 at $DIR/string.rs:+5:1 : +5:2
72
+ return; // scope 0 at $DIR/string.rs:+5:2 : +5:2
73
73
}
74
74
}
0 commit comments