From 03bc5be016a46ac802afa356f9e283f107d70b84 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sat, 22 Jul 2023 00:01:10 +0200 Subject: [PATCH] Fix Godbolt typo (#1014) --- src/ownership/borrowing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ownership/borrowing.md b/src/ownership/borrowing.md index 50088ddf..767c6dd2 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] or look at the assembly in [Godbold](https://rust.godbolt.org/). In the "DEBUG" optimization level, the addresses should change, while they 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] or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the "DEBUG" optimization level, the addresses should change, while they stay the same when changing to the "RELEASE" setting: ```rust,editable #[derive(Debug)] @@ -50,4 +50,4 @@ Notes on stack returns:
-[Playground]: https://play.rust-lang.org/ \ No newline at end of file +[Playground]: https://play.rust-lang.org/