Chapter 15.3 has "drop(c);" instead of "std::mem::drop(c)"
opened this issue · comments
Deleted user commented
- I have searched open and closed issues and pull requests for duplicates, using these search terms:
- 15.3
- I have checked the latest
main
branch to see if this has already been fixed, in this file:- 15.3
URL to the section(s) of the book with this problem:
doc.rust-lang.org/book/ch15-03-drop.html
Description of the problem:
Listing 15-16 has "drop(c);" instead of "std::mem::drop(c)"
Suggested fix:
crtl + c, crtl + v
Carol (Nichols || Goulding) commented
As stated in the text before listing 15-16:
The function is in the prelude, so we can modify main in Listing 15-15 to call the drop function, as shown in Listing 15-16: