| ▲ | 1718627440 an hour ago | |
My thoughts as well. The problem can be alleviated either by making the ownership change an error or "just" invoking the destructors in the correct order. But I think https://news.ycombinator.com/item?id=50072252 answers it:
So the compiler assumes it is guaranteed, that 'l' still exists, so it doesn't consider it in regard of finalizer ordering. | ||