2020-03-11 10:49:00 +00:00
// MIR for `main` after SimplifyCfg-initial
| User Type Annotations
2023-02-28 22:58:10 +00:00
| 0 : user_ty : Canonical { max_universe : U0 , variables : [ ] , value : Ty ( std ::option ::Option < std ::boxed ::Box < u32 > > ) } , span : $DIR / basic_assignment . rs :20 :17 : 20 :33 , inferred_ty : std ::option ::Option < std ::boxed ::Box < u32 > >
| 1 : user_ty : Canonical { max_universe : U0 , variables : [ ] , value : Ty ( std ::option ::Option < std ::boxed ::Box < u32 > > ) } , span : $DIR / basic_assignment . rs :20 :17 : 20 :33 , inferred_ty : std ::option ::Option < std ::boxed ::Box < u32 > >
2020-03-11 10:49:00 +00:00
|
fn main ( ) -> ( ) {
2022-07-27 18:47:42 +00:00
let mut _0 : ( ) ; // return place in scope 0 at $DIR/basic_assignment.rs:+0:11: +0:11
let _1 : bool ; // in scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
let mut _3 : bool ; // in scope 0 at $DIR/basic_assignment.rs:+6:16: +6:24
let mut _6 : std ::option ::Option < std ::boxed ::Box < u32 > > ; // in scope 0 at $DIR/basic_assignment.rs:+13:14: +13:20
2020-03-11 10:49:00 +00:00
scope 1 {
2022-07-27 18:47:42 +00:00
debug nodrop_x = > _1 ; // in scope 1 at $DIR/basic_assignment.rs:+1:9: +1:17
let _2 : bool ; // in scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
2020-03-11 10:49:00 +00:00
scope 2 {
2022-07-27 18:47:42 +00:00
debug nodrop_y = > _2 ; // in scope 2 at $DIR/basic_assignment.rs:+2:9: +2:17
let _4 : std ::option ::Option < std ::boxed ::Box < u32 > > as UserTypeProjection { base : UserType ( 0 ) , projs : [ ] } ; // in scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
2020-03-11 10:49:00 +00:00
scope 3 {
2022-07-27 18:47:42 +00:00
debug drop_x = > _4 ; // in scope 3 at $DIR/basic_assignment.rs:+8:9: +8:15
let _5 : std ::option ::Option < std ::boxed ::Box < u32 > > ; // in scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
2020-03-11 10:49:00 +00:00
scope 4 {
2022-07-27 18:47:42 +00:00
debug drop_y = > _5 ; // in scope 4 at $DIR/basic_assignment.rs:+9:9: +9:15
2020-03-11 10:49:00 +00:00
}
}
}
}
bb0 : {
2022-07-27 18:47:42 +00:00
StorageLive ( _1 ) ; // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
_1 = const false ; // scope 0 at $DIR/basic_assignment.rs:+1:20: +1:25
FakeRead ( ForLet ( None ) , _1 ) ; // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
StorageLive ( _2 ) ; // scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
StorageLive ( _3 ) ; // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_3 = _1 ; // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_2 = move _3 ; // scope 2 at $DIR/basic_assignment.rs:+6:5: +6:24
StorageDead ( _3 ) ; // scope 2 at $DIR/basic_assignment.rs:+6:23: +6:24
StorageLive ( _4 ) ; // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
_4 = Option ::< Box < u32 > > ::None ; // scope 2 at $DIR/basic_assignment.rs:+8:36: +8:40
FakeRead ( ForLet ( None ) , _4 ) ; // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
AscribeUserType ( _4 , o , UserTypeProjection { base : UserType ( 1 ) , projs : [ ] } ) ; // scope 2 at $DIR/basic_assignment.rs:+8:17: +8:33
StorageLive ( _5 ) ; // scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
StorageLive ( _6 ) ; // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
_6 = move _4 ; // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
2023-02-08 21:29:52 +00:00
drop ( _5 ) -> [ return : bb1 , unwind : bb2 ] ; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
2020-03-11 10:49:00 +00:00
}
2020-10-02 20:11:24 +00:00
bb1 : {
2023-02-08 21:29:52 +00:00
_5 = move _6 ; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
drop ( _6 ) -> [ return : bb3 , unwind : bb6 ] ; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
2021-01-22 03:38:58 +00:00
}
2023-02-08 21:29:52 +00:00
bb2 ( cleanup ) : {
_5 = move _6 ; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
drop ( _6 ) -> bb6 ; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
}
bb3 : {
2022-07-27 18:47:42 +00:00
StorageDead ( _6 ) ; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_0 = const ( ) ; // scope 0 at $DIR/basic_assignment.rs:+0:11: +14:2
2023-02-08 21:29:52 +00:00
drop ( _5 ) -> [ return : bb4 , unwind : bb7 ] ; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
2020-06-04 15:29:10 +00:00
}
2023-02-08 21:29:52 +00:00
bb4 : {
2022-07-27 18:47:42 +00:00
StorageDead ( _5 ) ; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
2023-02-08 21:29:52 +00:00
drop ( _4 ) -> [ return : bb5 , unwind : bb8 ] ; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
2020-06-04 15:29:10 +00:00
}
2023-02-08 21:29:52 +00:00
bb5 : {
2022-07-27 18:47:42 +00:00
StorageDead ( _4 ) ; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead ( _2 ) ; // scope 1 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead ( _1 ) ; // scope 0 at $DIR/basic_assignment.rs:+14:1: +14:2
return ; // scope 0 at $DIR/basic_assignment.rs:+14:2: +14:2
2020-06-04 15:29:10 +00:00
}
2020-10-24 10:18:32 +00:00
bb6 ( cleanup ) : {
2022-07-27 18:47:42 +00:00
drop ( _5 ) -> bb7 ; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
2021-01-22 03:38:58 +00:00
}
bb7 ( cleanup ) : {
2022-07-27 18:47:42 +00:00
drop ( _4 ) -> bb8 ; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
2021-01-22 03:38:58 +00:00
}
bb8 ( cleanup ) : {
2022-07-27 18:47:42 +00:00
resume ; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
2020-03-11 10:49:00 +00:00
}
}