@rauschma Uh-oh. I'm curious the context on this one.
@rauschma Sorry to hear it. I've been keeping an eye on Rust as a possible replacement for C++ in some tasks I'm responsible for, but "Sometimes the compiler just panics" is going to be a real hard sell to my teammates.
@mtomczak @rauschma I know in LLVM this is a bit of an issue with `llvm_unreachable`, which is undefined behavior if reached in release mode, and is a bit overused: https://discourse.llvm.org/t/llvm-unreachable-is-widely-misused/60587
Though in LLVM codegen that applies to Rust too. But LLVM added an option to make this trap instead of undefined behavior, and when I saw that I opened a PR to Rust to enable it: https://github.com/rust-lang/rust/pull/109373
@mtomczak I've only personally seen this with an experimental LLVM backend (m68k), so I don't know how much this or other similar things are a problem in practice.
But it does seem to show something about Rust vs. C++ development philosophy (favoring panics over undefined behavior, for cases that shouldn't happen but aren't statically guaranteed not to), including in how the compiler itself is developed.
@mtomczak Apparently the compiler doesn’t like my code. Don’t know why.