From 4c052d33c81dcd1f150a8f6e5b35f969dbe115fd Mon Sep 17 00:00:00 2001 From: Igor Petruk Date: Mon, 23 Jan 2023 11:24:17 +0000 Subject: [PATCH] Update borrowing.md (#222) --- src/ownership/borrowing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ownership/borrowing.md b/src/ownership/borrowing.md index 4afddf86..ce4ec067 100644 --- a/src/ownership/borrowing.md +++ b/src/ownership/borrowing.md @@ -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.