Skip to content

Commit

Permalink
Update E0716.md
Browse files Browse the repository at this point in the history
Clearer wording
  • Loading branch information
carschandler authored Mar 1, 2024
1 parent 71a6973 commit 50ff362
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_error_codes/src/error_codes/E0716.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ let q = p;

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
statement -- in this case, after the outer `let` that assigns to `p`. This is
illustrated in the example above by showing that `tmp` would be freed as we exit
the block.
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.

To fix this problem, you need to create a local variable to store the value in
rather than relying on a temporary. For example, you might change the original
Expand Down

0 comments on commit 50ff362

Please sign in to comment.