Closed krtab closed 1 year ago
Thanks for the review. For those interested the zulip discussion is here: https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Review.20for.20https.3A.2F.2Fgithub.2Ecom.2Frust-lang.2Fnomicon.2Fpull.2F403
Hi!
I'm not entirely sure but I believe the code as currently presented has potential for UB. Indeed,
inner
is dropped after the anonymous Box, which means that is is dangling at some point. Iiuc, dangling references are UB in Rust, even if not accessed. In case there is no issue, I think it would be beneficial to explain why in the code comments.