From e8ed8cb5deb8c155e2a2bd833f247055e527a1dc Mon Sep 17 00:00:00 2001 From: Fabian Bornhofen Date: Thu, 12 Jan 2023 11:32:11 +0100 Subject: [PATCH] Clean up playground link in borrowing.md --- src/ownership/borrowing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ownership/borrowing.md b/src/ownership/borrowing.md index fda32e1c..4afddf86 100644 --- a/src/ownership/borrowing.md +++ b/src/ownership/borrowing.md @@ -25,7 +25,7 @@ fn main() {
Notes on stack returns: -* Demonstrate that the return from `add` is cheap because the compiler can eliminate the copy operation. Change the above code to print stack addresses and run it on the [Playground](https://play.rust-lang.org/). In the "DEBUG" optimization level, the addresses should change, while the stay the same when changing to the "RELEASE" setting: +* Demonstrate that the return from `add` is cheap because the compiler can eliminate the copy operation. Change the above code to print stack addresses and run it on the [Playground]. In the "DEBUG" optimization level, the addresses should change, while the stay the same when changing to the "RELEASE" setting: ```rust,editable #[derive(Debug)] @@ -49,3 +49,5 @@ Notes on stack returns: * 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.
+ +[Playground]: https://play.rust-lang.org/