The C++ example specifically shows that if you're talking about ownership and lifetimes, you're not talking about move semantics. As you pointed out, the example wouldn't work in Rust specifically because Rust has a borrow checker, and not just move semantics.
A compiler with a borrow checker will perform move optimizations, which at runtime result in behavior similar to C++ move semantics. So I'm pointing out that in this thread, we're really talking about borrow checking with declarative lifetimes more than move semantics. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/DNZP5Z372TFTT2QDXHQYQ7SM5OGDTAZQ/ Code of Conduct: http://python.org/psf/codeofconduct/