nomicon icon indicating copy to clipboard operation
nomicon copied to clipboard

Exception safety statement regarding Box contradicted by std docs

Open gfaster opened this issue 3 months ago • 0 comments

https://github.com/rust-lang/nomicon/blob/91044a66c8342ce3a85ebf5bc3f6811a39843990/src/unchecked-uninit.md?plain=1#L32

This asserts that Box::new cannot panic, but of course, it may fail to allocate in which case handle_alloc_error is called, which is documented as potentially panicking.

gfaster avatar Nov 06 '25 15:11 gfaster