• 0 Posts
  • 6 Comments
Joined 2 months ago
cake
Cake day: August 9th, 2026

help-circle





  • Yeah it’s pretty sad… we were so close to stabilizing it, but then it turned out that some people had different ideas of the exact semantics of this intrinsic in terms of soundness reasoning. It took a lot of discussion for us to even figure out what the differences were. We did in the end all manage to agree on what the two options are, but then the inertia was gone and we didn’t manage to reach a consensus on which of the two options to pick, or how to name them if we decide to offer both options. So it remains unstable. :(

    The disagreement boils down to the question of whether this code is sound:

    pub fn my_fun() {
      breakpoint();
      unsafe { std::hint::unreachable_unchecked() };
    }
    

    We all agreed on what would happen if this is executed in a debugger, execution halts at the breakpoint, and the user says “continue” – the result is UB, i.e., something went wrong. But we disagreed on whose fault this is – is the function wrong for causing UB after breakpoint returns, or is the user interacting with the debugger wrong to ask the program to continue after this breakpoint?


    score 2 · canonical