Rollup merge of #120684 - carschandler:patch-1, r=nnethercote

Update E0716.md for clarity

When reading through this, I got slightly hung up thinking the `let` it was referring to was the `let tmp` on line 25, which was confusing considering the comment states that the temporary is freed at the end of the block. I think adding this clarification could potentially help some beginners like myself without being overly verbose.
This commit is contained in:
Matthias Krüger 2024-03-02 10:09:35 +01:00 committed by GitHub
commit 1c724ee110
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,7 @@ let q = p;
Whenever a temporary is created, it is automatically dropped (freed) according Whenever a temporary is created, it is automatically dropped (freed) according
to fixed rules. Ordinarily, the temporary is dropped at the end of the enclosing to fixed rules. Ordinarily, the temporary is dropped at the end of the enclosing
statement -- in this case, after the `let`. This is illustrated in the example statement -- in this case, after the `let p`. This is illustrated in the example
above by showing that `tmp` would be freed as we exit the block. above by showing that `tmp` would be freed as we exit the block.
To fix this problem, you need to create a local variable to store the value in To fix this problem, you need to create a local variable to store the value in