Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guessing Game Does Not Work On Current Release #99699

Closed
dmccreary opened this issue Jul 24, 2022 · 2 comments
Closed

Guessing Game Does Not Work On Current Release #99699

dmccreary opened this issue Jul 24, 2022 · 2 comments

Comments

@dmccreary
Copy link

dmccreary commented Jul 24, 2022

Location

In the Rust Language Book, In Chapter 2, the guessing game does not work:

https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html#processing-a-guess

this line:

println!("You guessed: {guess}");

Generates the error:

error: there is no argument named guess

But this works:

println!("You guessed: {}", guess);

There is a similar problem with secret_number

@dmccreary dmccreary added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jul 24, 2022
@mqudsi
Copy link
Contributor

mqudsi commented Jul 24, 2022

My guess: you're using an old version of rust.

@JohnTitor
Copy link
Member

Yeah, I think so too. You have to use Rust 1.59 or higher as described in https://doc.rust-lang.org/book/title-page.html (or 1.62 if you're reading https://doc.rust-lang.org/nightly/book/title-page.html), could you check your Rust version (rustc -vV will show it)?

And this repo's issue tracker is for the Rust compiler, std, and some more stuff, issues related to the book should go to https://github.com/rust-lang/book/issues.

I'm going to close with the above reasons, feel free to open another issue if you still have an issue.

@JohnTitor JohnTitor closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2022
@JohnTitor JohnTitor removed the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jul 24, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jul 27, 2022
…rk-Simulacrum

Add some comments to the docs issue template to clarify

Newcomers may not know that some docs have their own repositories (e.g. the book, the reference), or that the documentation and rustdoc are different.
Actually, this template was used to report an issue related to the book: rust-lang#99699
This adds some comments to clarify the above things. I'm not sure if the current wording is the best, any suggestion would be helpful!

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants