@@ -4,21 +4,20 @@ fn test() -> Option<Box<u32>> {
4
4
let mut _0 : std::option::Option<std::boxed::Box<u32>>; // return place in scope 0 at $DIR/issue-62289.rs:8:14: 8:30
5
5
let mut _1 : std::boxed::Box<u32>; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21
6
6
let mut _2 : std::boxed::Box<u32>; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21
7
- let mut _3 : std::result::Result<u32, std::option::NoneError >; // in scope 0 at $DIR/issue-62289.rs:9:15: 9:20
7
+ let mut _3 : std::ops::ControlFlow< std::option::Option<!>, u32 >; // in scope 0 at $DIR/issue-62289.rs:9:15: 9:20
8
8
let mut _4 : std::option::Option<u32>; // in scope 0 at $DIR/issue-62289.rs:9:15: 9:19
9
- let mut _5 : isize; // in scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
10
- let _6 : std::option::NoneError ; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
9
+ let mut _5 : isize; // in scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
10
+ let _6 : std::option::Option<!> ; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
11
11
let mut _7 : !; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
12
- let mut _8 : std::option::NoneError; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
13
- let mut _9 : std::option::NoneError; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
14
- let _10 : u32; // in scope 0 at $DIR/issue-62289.rs:9:15: 9:20
12
+ let mut _8 : std::option::Option<!>; // in scope 0 at $DIR/issue-62289.rs:9:19: 9:20
13
+ let _9 : u32; // in scope 0 at $DIR/issue-62289.rs:9:15: 9:20
15
14
scope 1 {
16
- debug err => _6; // in scope 1 at $DIR/issue-62289.rs:9:19 : 9:20
15
+ debug holder => _6; // in scope 1 at $DIR/issue-62289.rs:9:19 : 9:20
17
16
scope 2 {
18
17
}
19
18
}
20
19
scope 3 {
21
- debug val => _10; // in scope 3 at $DIR/issue-62289.rs:9:15 : 9:20
20
+ debug val => _9; // in scope 3 at $DIR/issue-62289.rs:9:15 : 9:20
22
21
scope 4 {
23
22
}
24
23
}
@@ -30,25 +29,25 @@ fn test() -> Option<Box<u32>> {
30
29
StorageLive(_3); // scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
31
30
StorageLive(_4); // scope 0 at $DIR/issue-62289.rs:9:15 : 9:19
32
31
_4 = Option::<u32>::None; // scope 0 at $DIR/issue-62289.rs:9:15 : 9:19
33
- _3 = <Option<u32> as Try>::into_result (move _4) -> [return : bb1, unwind: bb12 ]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
32
+ _3 = <Option<u32> as Try>::branch (move _4) -> [return : bb1, unwind: bb11 ]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
34
33
// mir::Constant
35
34
// + span : $DIR/issue-62289.rs:9:15: 9:20
36
- // + literal : Const { ty: fn(std::option::Option<u32>) -> std::result::Result <<std::option::Option<u32> as std::ops::Try >::Ok , <std::option::Option<u32> as std::ops::Try >::Error > {<std::option::Option<u32> as std::ops::Try >::into_result }, val: Value(Scalar(<ZST>)) }
35
+ // + literal : Const { ty: fn(std::option::Option<u32>) -> std::ops::ControlFlow <<std::option::Option<u32> as std::ops::Try2021 >::Residual , <std::option::Option<u32> as std::ops::Try2021 >::Ok > {<std::option::Option<u32> as std::ops::Try2021 >::branch }, val: Value(Scalar(<ZST>)) }
37
36
}
38
37
39
38
bb1 : {
40
39
StorageDead(_4); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
41
- _5 = discriminant(_3); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
42
- switchInt(move _5) -> [0_isize : bb2, 1_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
40
+ _5 = discriminant(_3); // scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
41
+ switchInt(move _5) -> [0_isize : bb2, 1_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
43
42
}
44
43
45
44
bb2 : {
46
- StorageLive(_10); // scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
47
- _10 = ((_3 as Ok ).0 : u32); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
48
- (*_2) = _10; // scope 4 at $DIR/issue-62289.rs:9:15 : 9:20
49
- StorageDead(_10); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
45
+ StorageLive(_9); // scope 0 at $DIR/issue-62289.rs:9:15 : 9:20
46
+ _9 = ((_3 as Continue ).0 : u32); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20
47
+ (*_2) = _9; // scope 4 at $DIR/issue-62289.rs:9:15 : 9:20
48
+ StorageDead(_9); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
50
49
_1 = move _2; // scope 0 at $DIR/issue-62289.rs:9:10 : 9:21
51
- drop(_2) -> [return : bb7 , unwind: bb11 ]; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
50
+ drop(_2) -> [return : bb6 , unwind: bb10 ]; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
52
51
}
53
52
54
53
bb3 : {
@@ -57,62 +56,53 @@ fn test() -> Option<Box<u32>> {
57
56
58
57
bb4 : {
59
58
StorageLive(_6); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
60
- _6 = ((_3 as Err ).0 : std::option::NoneError ); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
59
+ _6 = ((_3 as Break ).0 : std::option::Option<!> ); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20
61
60
StorageLive(_8); // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
62
- StorageLive(_9); // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
63
- _9 = _6; // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
64
- _8 = <NoneError as From<NoneError>>::from(move _9) -> [return : bb5, unwind: bb12]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
65
- // mir::Constant
66
- // + span : $DIR/issue-62289.rs:9:19: 9:20
67
- // + literal : Const { ty: fn(std::option::NoneError) -> std::option::NoneError {<std::option::NoneError as std::convert::From<std::option::NoneError>>::from}, val: Value(Scalar(<ZST>)) }
68
- }
69
-
70
- bb5 : {
71
- StorageDead(_9); // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
72
- _0 = <Option<Box<u32>> as Try>::from_error(move _8) -> [return : bb6, unwind: bb12]; // scope 2 at $DIR/issue-62289.rs:9:15: 9:20
61
+ _8 = _6; // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
62
+ _0 = <Option<Box<u32>> as FromResidual<Option<!>>>::from_residual(move _8) -> [return : bb5, unwind: bb11]; // scope 2 at $DIR/issue-62289.rs:9:15: 9:20
73
63
// mir::Constant
74
64
// + span : $DIR/issue-62289.rs:9:15: 9:20
75
- // + literal : Const { ty: fn(< std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::Error ) -> std::option::Option<std::boxed::Box<u32>> {<std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error }, val: Value(Scalar(<ZST>)) }
65
+ // + literal : Const { ty: fn(std::option::Option<!> ) -> std::option::Option<std::boxed::Box<u32>> {<std::option::Option<std::boxed::Box<u32>> as std::ops::FromResidual<std::option::Option<!>>>::from_residual }, val: Value(Scalar(<ZST>)) }
76
66
}
77
67
78
- bb6 : {
68
+ bb5 : {
79
69
StorageDead(_8); // scope 2 at $DIR/issue-62289.rs:9:19 : 9:20
80
70
StorageDead(_6); // scope 0 at $DIR/issue-62289.rs:9:19 : 9:20
81
- drop(_2) -> bb9 ; // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
71
+ drop(_2) -> bb8 ; // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
82
72
}
83
73
84
- bb7 : {
74
+ bb6 : {
85
75
StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
86
76
_0 = Option::<Box<u32>>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5 : 9:22
87
- drop(_1) -> bb8 ; // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
77
+ drop(_1) -> bb7 ; // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
88
78
}
89
79
90
- bb8 : {
80
+ bb7 : {
91
81
StorageDead(_1); // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
92
82
StorageDead(_3); // scope 0 at $DIR/issue-62289.rs:10:1 : 10:2
93
- goto -> bb10; // scope 0 at $DIR/issue-62289.rs:10:2 : 10:2
83
+ goto -> bb9; // scope 0 at $DIR/issue-62289.rs:10:2 : 10:2
94
84
}
95
85
96
- bb9 : {
86
+ bb8 : {
97
87
StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
98
88
StorageDead(_1); // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
99
89
StorageDead(_3); // scope 0 at $DIR/issue-62289.rs:10:1 : 10:2
100
- goto -> bb10; // scope 0 at $DIR/issue-62289.rs:10:2 : 10:2
90
+ goto -> bb9; // scope 0 at $DIR/issue-62289.rs:10:2 : 10:2
101
91
}
102
92
103
- bb10 : {
93
+ bb9 : {
104
94
return; // scope 0 at $DIR/issue-62289.rs:10:2 : 10:2
105
95
}
106
96
107
- bb11 (cleanup) : {
108
- drop(_1) -> bb13 ; // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
97
+ bb10 (cleanup) : {
98
+ drop(_1) -> bb12 ; // scope 0 at $DIR/issue-62289.rs:9:21 : 9:22
109
99
}
110
100
111
- bb12 (cleanup) : {
112
- drop(_2) -> bb13 ; // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
101
+ bb11 (cleanup) : {
102
+ drop(_2) -> bb12 ; // scope 0 at $DIR/issue-62289.rs:9:20 : 9:21
113
103
}
114
104
115
- bb13 (cleanup) : {
105
+ bb12 (cleanup) : {
116
106
resume; // scope 0 at $DIR/issue-62289.rs:8:1 : 10:2
117
107
}
118
108
}
0 commit comments