1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-08-08 00:12:51 +02:00
This commit is contained in:
Glen De Cauwsemaecker
2025-07-27 18:49:33 +02:00
parent 5c2ec8c5b1
commit 0baa990306

View File

@ -49,7 +49,7 @@ fn write_log() -> io::Result<()> {
```
This last sentence suggests that there was no other design choice because of unwinding.
That's not true: in C++, for example, one can throw an exception from a destructor while uwinding
That's not true: in C++, for example, one can throw an exception from a destructor while unwinding
because of another exception. Throwing from a destructor is messy and error-prone
(and pretty much every style guide tells you not to do it),
however that is an existence proof that Rust's design choice here was not entirely forced.