Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What Is Rust's Unsafe? (2019). Parent comment
For example, this is UB:
unsafe { std::hint::unreachable_unchecked() };
fn unsound(trigger: bool) { if trigger { unsafe { std::hint::unreachable_unchecked() }; } }
There are no comments on this comment yet.
For example, this is UB:
And this is an unsound code, that may not contain any UB if I call `unsound()` with `false`: