pin_init_array_from_fn is unsound as it does not drop already-initialized elements during unwind. Same for pin_chain.
The fix would be to use a guard type that frees elements on both panicking and erroring path rather than check if returned value is Err.
pin_init_array_from_fnis unsound as it does not drop already-initialized elements during unwind. Same forpin_chain.The fix would be to use a guard type that frees elements on both panicking and erroring path rather than check if returned value is
Err.