Yes, but rust on LLVM will also perform NRVO, will it not?
NRVO is a compiler optimization, not a feature of the language itself.
NRVO is a compiler optimization, not a feature of the language itself.
So it's up to the compiler to elide the copy (making it a compiler optimisation as you say), but the standard says that it has to move if it doesn't elide. This means that returning a named loca variable by value is always the best choice. Again, see "Effective Modern C++" for more.
Rust doesn't, so it's just an optimization. In C++ the code will have different semantics (e.g. if your move ctors have side effects) based on this optimization, so the language needs to define if/how it works.
trait Copy: Clone {}
Copy is nearly always done by memcpy/memmove. When Copy is invoked it won't use the `Clone::clone` method: https://is.gd/2hMyNP.
i.e. Clone is always explicit.Added: Essentially Copy is the same as a move, but the original value is still valid.