Skip to content

Chapter 2 - "Generating a Random Number" Instructions in NOTE don't work (rand dependency not documented) #2972

@Steve-Stearns-CardinalPeak

Description

  • I have checked the latest main branch to see if this has already been fixed
  • I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem:
https://github.com/rust-lang/book/blob/main/src/ch02-00-guessing-game-tutorial.md

Description of the problem:
Following the instructions in the note, the documentation generated and opened does not include the documentation for the rand dependency. Per the discussion here: rust-lang/cargo#3805 It appears that it's not intended for the internal dependencies to be documented in that manner. I did try the approach shown in issue 3805 (cargo doc -p rand:0.3.23 --open) and that did allow me to see the rand documentation.

Suggested fix:
The note needs to be corrected to show the correct way which will successfully "build documentation provided by all of your dependencies locally and open it" as this would be very helpful.

It appears "cargo doc --all --open" works but I notice that the documentation for cargo doc deprecates this option in favor of --workspace which also appears to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked upstreamBlocked on a change that needs to happen in a different repo first

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions