mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-02 02:56:26 +02:00
parent
ba28dd2d4c
commit
ff66258c50
@ -25,7 +25,7 @@ fn main() {
|
||||
<details>
|
||||
|
||||
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]. 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 they stay the same when changing to the "RELEASE" setting:
|
||||
|
||||
```rust,editable
|
||||
#[derive(Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user