2020-04-04 17:15:01 +00:00
// MIR for `main` 0 nll
| Free Region Mapping
| '_ #0 r | Global | [ '_ #0 r , '_ #1 r ]
| '_ #1 r | Local | [ '_ #1 r ]
|
| Inferred Region Values
2020-10-02 16:11:24 -04:00
| '_ #0 r | U0 | { bb0 [ 0 ..= 8 ] , bb1 [ 0 ..= 8 ] , bb2 [ 0 ] , bb3 [ 0 ..= 1 ] , bb4 [ 0 ..= 3 ] , bb5 [ 0 ..= 3 ] , bb6 [ 0 ..= 2 ] , bb7 [ 0 ..= 5 ] , bb8 [ 0 ] , '_ #0 r , '_ #1 r }
| '_ #1 r | U0 | { bb0 [ 0 ..= 8 ] , bb1 [ 0 ..= 8 ] , bb2 [ 0 ] , bb3 [ 0 ..= 1 ] , bb4 [ 0 ..= 3 ] , bb5 [ 0 ..= 3 ] , bb6 [ 0 ..= 2 ] , bb7 [ 0 ..= 5 ] , bb8 [ 0 ] , '_ #1 r }
2020-04-09 10:55:27 +00:00
| '_ #2 r | U0 | { }
2020-10-02 16:11:24 -04:00
| '_ #3 r | U0 | { bb1 [ 0 ..= 8 ] , bb2 [ 0 ] , bb4 [ 0 ..= 2 ] }
| '_ #4 r | U0 | { bb1 [ 1 ..= 8 ] , bb2 [ 0 ] , bb4 [ 0 ..= 2 ] }
| '_ #5 r | U0 | { bb1 [ 4 ..= 8 ] , bb2 [ 0 ] , bb4 [ 0 ..= 2 ] }
2020-04-04 17:15:01 +00:00
|
| Inference Constraints
2020-10-02 16:11:24 -04:00
| '_ #0 r live at { bb0 [ 0 ..= 8 ] , bb1 [ 0 ..= 8 ] , bb2 [ 0 ] , bb3 [ 0 ..= 1 ] , bb4 [ 0 ..= 3 ] , bb5 [ 0 ..= 3 ] , bb6 [ 0 ..= 2 ] , bb7 [ 0 ..= 5 ] , bb8 [ 0 ] }
| '_ #1 r live at { bb0 [ 0 ..= 8 ] , bb1 [ 0 ..= 8 ] , bb2 [ 0 ] , bb3 [ 0 ..= 1 ] , bb4 [ 0 ..= 3 ] , bb5 [ 0 ..= 3 ] , bb6 [ 0 ..= 2 ] , bb7 [ 0 ..= 5 ] , bb8 [ 0 ] }
| '_ #3 r live at { bb1 [ 0 ] }
| '_ #4 r live at { bb1 [ 1 ..= 3 ] }
| '_ #5 r live at { bb1 [ 4 ..= 8 ] , bb2 [ 0 ] , bb4 [ 0 ..= 2 ] }
| '_ #3 r : '_ #4 r due to Assignment at Single ( bb1 [ 0 ] )
| '_ #4 r : '_ #5 r due to Assignment at Single ( bb1 [ 3 ] )
2020-04-04 17:15:01 +00:00
|
fn main ( ) -> ( ) {
2020-04-09 10:55:27 +00:00
let mut _0 : ( ) ; // return place in scope 0 at $DIR/region-subtyping-basic.rs:16:11: 16:11
let mut _1 : [ usize ; Const { ty : usize , val : Value ( Scalar ( 0x0000000000000003 ) ) } ] ; // in scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
let _3 : usize ; // in scope 0 at $DIR/region-subtyping-basic.rs:18:16: 18:17
let mut _4 : usize ; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
let mut _5 : bool ; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
let mut _7 : bool ; // in scope 0 at $DIR/region-subtyping-basic.rs:20:8: 20:12
let _8 : bool ; // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18
let mut _9 : usize ; // in scope 0 at $DIR/region-subtyping-basic.rs:21:15: 21:17
let _10 : bool ; // in scope 0 at $DIR/region-subtyping-basic.rs:23:9: 23:18
2020-04-04 17:15:01 +00:00
scope 1 {
2020-04-09 10:55:27 +00:00
debug v = > _1 ; // in scope 1 at $DIR/region-subtyping-basic.rs:17:9: 17:14
let _2 : & '_ #4 r usize ; // in scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
2020-04-04 17:15:01 +00:00
scope 2 {
2020-04-09 10:55:27 +00:00
debug p = > _2 ; // in scope 2 at $DIR/region-subtyping-basic.rs:18:9: 18:10
let _6 : & '_ #5 r usize ; // in scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
2020-04-04 17:15:01 +00:00
scope 3 {
2020-04-09 10:55:27 +00:00
debug q = > _6 ; // in scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:10
2020-04-04 17:15:01 +00:00
}
}
}
bb0 : {
2020-04-09 10:55:27 +00:00
StorageLive ( _1 ) ; // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
_1 = [ const Const ( Value ( Scalar ( 0x0000000000000001 ) ) : usize ) , const Const ( Value ( Scalar ( 0x0000000000000002 ) ) : usize ) , const Const ( Value ( Scalar ( 0x0000000000000003 ) ) : usize ) ] ; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26
FakeRead ( ForLet , _1 ) ; // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
StorageLive ( _2 ) ; // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
StorageLive ( _3 ) ; // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
_3 = const Const ( Value ( Scalar ( 0x0000000000000000 ) ) : usize ) ; // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
_4 = Len ( _1 ) ; // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
_5 = Lt ( _3 , _4 ) ; // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
2020-10-02 16:11:24 -04:00
assert ( move _5 , " index out of bounds: the length is {} but the index is {} " , move _4 , _3 ) -> [ success : bb1 , unwind : bb8 ] ; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
2020-04-04 17:15:01 +00:00
}
2020-10-02 16:11:24 -04:00
bb1 : {
_2 = & '_ #3 r _1 [ _3 ] ; // bb1[0]: scope 1 at $DIR/region-subtyping-basic.rs:18:13: 18:18
FakeRead ( ForLet , _2 ) ; // bb1[1]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
StorageLive ( _6 ) ; // bb1[2]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
_6 = _2 ; // bb1[3]: scope 2 at $DIR/region-subtyping-basic.rs:19:13: 19:14
FakeRead ( ForLet , _6 ) ; // bb1[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
StorageLive ( _7 ) ; // bb1[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
_7 = const Const ( Value ( Scalar ( 0x01 ) ) : bool ) ; // bb1[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
FakeRead ( ForMatchedPlace , _7 ) ; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
switchInt ( _7 ) -> [ Const ( Value ( Scalar ( 0x00 ) ) : bool ) : bb3 , otherwise : bb2 ] ; // bb1[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
2020-06-04 11:29:10 -04:00
}
bb2 : {
2020-10-02 16:11:24 -04:00
falseEdge -> [ real : bb4 , imaginary : bb3 ] ; // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
2020-04-04 17:15:01 +00:00
}
2020-06-04 11:29:10 -04:00
bb3 : {
2020-10-02 16:11:24 -04:00
StorageLive ( _10 ) ; // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
_10 = Const ( Value ( Scalar ( < ZST > ) ) : fn ( usize ) -> bool { use_x } ) ( const Const ( Value ( Scalar ( 0x0000000000000016 ) ) : usize ) ) -> [ return : bb6 , unwind : bb8 ] ; // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
2020-04-04 17:15:01 +00:00
// mir::Constant
2020-04-09 10:55:27 +00:00
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
2020-04-04 17:15:01 +00:00
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
}
2020-10-02 16:11:24 -04:00
bb4 : {
StorageLive ( _8 ) ; // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
StorageLive ( _9 ) ; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
_9 = ( * _6 ) ; // bb4[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
_8 = Const ( Value ( Scalar ( < ZST > ) ) : fn ( usize ) -> bool { use_x } ) ( move _9 ) -> [ return : bb5 , unwind : bb8 ] ; // bb4[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
2020-04-04 17:15:01 +00:00
// mir::Constant
2020-04-09 10:55:27 +00:00
// + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
2020-04-04 17:15:01 +00:00
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
}
2020-10-02 16:11:24 -04:00
bb5 : {
StorageDead ( _9 ) ; // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18
StorageDead ( _8 ) ; // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
_0 = const Const ( Value ( Scalar ( < ZST > ) ) : ( ) ) ; // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6
goto -> bb7 ; // bb5[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
}
2020-06-04 11:29:10 -04:00
bb6 : {
2020-10-02 16:11:24 -04:00
StorageDead ( _10 ) ; // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19
_0 = const Const ( Value ( Scalar ( < ZST > ) ) : ( ) ) ; // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6
goto -> bb7 ; // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
2020-04-04 17:15:01 +00:00
}
2020-06-04 11:29:10 -04:00
bb7 : {
2020-10-02 16:11:24 -04:00
StorageDead ( _6 ) ; // bb7[0]: scope 2 at $DIR/region-subtyping-basic.rs:25:1: 25:2
StorageDead ( _3 ) ; // bb7[1]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
StorageDead ( _2 ) ; // bb7[2]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
StorageDead ( _1 ) ; // bb7[3]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
StorageDead ( _7 ) ; // bb7[4]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
return ; // bb7[5]: scope 0 at $DIR/region-subtyping-basic.rs:25:2: 25:2
2020-04-04 17:15:01 +00:00
}
2020-10-02 16:11:24 -04:00
bb8 ( cleanup ) : {
resume ; // bb8[0]: scope 0 at $DIR/region-subtyping-basic.rs:16:1: 25:2
2020-04-04 17:15:01 +00:00
}
}