1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-15 18:44:18 +02:00

Update borrowing.md (#222)

This commit is contained in:
Igor Petruk
2023-01-23 11:24:17 +00:00
committed by GitHub
parent de4aa3de88
commit 4c052d33c8

View File

@ -46,7 +46,7 @@ Notes on stack returns:
}
```
* The Rust compiler can do return value optimization (RVO).
* In C++, copy elision has to be defined in the language specification because constructors can have side effects. In Rust, this is not an issue at all.
* In C++, copy elision has to be defined in the language specification because constructors can have side effects. In Rust, this is not an issue at all. If RVO did not happen, Rust will always performs a simple and efficient `memcpy` copy.
</details>