Comment by carlmr

8 days ago

Yes, we're discussing though in safe (non-unsafe/normal) Rust here. There is no safe C++, everything in C++ is unsafe by default. Even more unsafe than Rust unsafe, because Rust unsafe still does a lot of the safety measures of normal Rust, but allows only a handful extra things and doesn't disable the borrow checker:

https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html

But getting back to the point, the C++ compiler doesn't have a borrow checker, so it can't have a bug in it. So it's on you, as the developer, to take care of all unsoundness.

While in Rust an issue is now filed, and with the fix, every future Rust program gets the fix.

It doesn't matter whether the bug is in the borrow checker or not. A comparable bug in a C++ compiler would be compiling a program that should not typecheck according to the C++ standard and then causes a segfault or a bug at runtime.