|
24 | 24 | debug ptr => _6; |
25 | 25 | scope 11 (inlined NonNull::<[bool; 0]>::new_unchecked) { |
26 | 26 | debug ptr => _6; |
27 | | - let mut _8: *const [bool; 0]; |
28 | | - let mut _9: *mut [bool; 0]; |
| 27 | + let mut _9: *const [bool; 0]; |
29 | 28 | scope 12 { |
30 | | - scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) { |
31 | | - debug ptr => _9; |
32 | | - scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) { |
33 | | - debug self => _9; |
34 | | - let mut _10: *mut u8; |
35 | | - scope 15 { |
36 | | - scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) { |
37 | | - debug ptr => _10; |
38 | | - scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) { |
39 | | - debug self => _10; |
40 | | - scope 18 { |
41 | | - scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) { |
42 | | - debug self => _10; |
| 29 | + let _8: bool; |
| 30 | + scope 13 { |
| 31 | + debug should_check => _8; |
| 32 | + scope 14 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) { |
| 33 | + debug ptr => _6; |
| 34 | + let _10: !; |
| 35 | + scope 15 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) { |
| 36 | + debug self => _6; |
| 37 | + let mut _11: *mut u8; |
| 38 | + scope 16 { |
| 39 | + scope 17 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) { |
| 40 | + debug ptr => _11; |
| 41 | + let mut _12: usize; |
| 42 | + scope 18 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) { |
| 43 | + debug self => _11; |
| 44 | + let mut _13: *mut (); |
| 45 | + scope 19 { |
| 46 | + scope 20 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) { |
| 47 | + debug self => _11; |
| 48 | + } |
43 | 49 | } |
44 | 50 | } |
45 | 51 | } |
|
66 | 72 | StorageLive(_1); |
67 | 73 | StorageLive(_2); |
68 | 74 | StorageLive(_3); |
| 75 | + StorageLive(_10); |
69 | 76 | StorageLive(_4); |
70 | 77 | StorageLive(_5); |
71 | 78 | StorageLive(_6); |
|
75 | 82 | StorageDead(_7); |
76 | 83 | StorageLive(_8); |
77 | 84 | StorageLive(_9); |
78 | | - StorageLive(_10); |
79 | | - _8 = const {0x1 as *mut [bool; 0]} as *const [bool; 0] (PointerCoercion(MutToConstPointer)); |
80 | | - _5 = NonNull::<[bool; 0]> { pointer: _8 }; |
81 | | - StorageDead(_10); |
| 85 | + _8 = intrinsics::debug_assertions() -> [return: bb2, unwind unreachable]; |
| 86 | + } |
| 87 | + |
| 88 | + bb1: { |
| 89 | + StorageDead(_1); |
| 90 | + return; |
| 91 | + } |
| 92 | + |
| 93 | + bb2: { |
| 94 | + switchInt(_8) -> [0: bb4, otherwise: bb3]; |
| 95 | + } |
| 96 | + |
| 97 | + bb3: { |
| 98 | + StorageLive(_11); |
| 99 | + _11 = const {0x1 as *mut [bool; 0]} as *mut u8 (PtrToPtr); |
| 100 | + StorageLive(_12); |
| 101 | + StorageLive(_13); |
| 102 | + _13 = _11 as *mut () (PtrToPtr); |
| 103 | + _12 = move _13 as usize (Transmute); |
| 104 | + StorageDead(_13); |
| 105 | + StorageDead(_11); |
| 106 | + switchInt(move _12) -> [0: bb5, otherwise: bb6]; |
| 107 | + } |
| 108 | + |
| 109 | + bb4: { |
| 110 | + _9 = const {0x1 as *mut [bool; 0]} as *const [bool; 0] (PointerCoercion(MutToConstPointer)); |
| 111 | + _5 = NonNull::<[bool; 0]> { pointer: _9 }; |
82 | 112 | StorageDead(_9); |
83 | 113 | StorageDead(_8); |
84 | 114 | StorageDead(_6); |
|
87 | 117 | _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize)); |
88 | 118 | StorageDead(_4); |
89 | 119 | _2 = Box::<[bool]>(_3, const std::alloc::Global); |
| 120 | + StorageDead(_10); |
90 | 121 | StorageDead(_3); |
91 | 122 | _1 = A { foo: move _2 }; |
92 | 123 | StorageDead(_2); |
93 | 124 | _0 = const (); |
94 | 125 | drop(_1) -> [return: bb1, unwind unreachable]; |
95 | 126 | } |
96 | 127 |
|
97 | | - bb1: { |
98 | | - StorageDead(_1); |
99 | | - return; |
| 128 | + bb5: { |
| 129 | + StorageDead(_12); |
| 130 | + _10 = core::panicking::panic_nounwind(const "unsafe precondition(s) violated: NonNull::new_unchecked requires that the pointer is non-null") -> unwind unreachable; |
| 131 | + } |
| 132 | + |
| 133 | + bb6: { |
| 134 | + StorageDead(_12); |
| 135 | + goto -> bb4; |
100 | 136 | } |
101 | 137 | } |
102 | 138 |
|
0 commit comments