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

A mistake in the document guide.md #20255

Closed
soulmachine opened this issue Dec 27, 2014 · 2 comments
Closed

A mistake in the document guide.md #20255

soulmachine opened this issue Dec 27, 2014 · 2 comments

Comments

@soulmachine
Copy link

https://github.com/rust-lang/rust/blame/master/src/doc/guide.md#L2282 this line of code can not compile,

type `&'static str` does not implement any method in scope named `parse`

Should replace all parse() with from_str()

let input_num =  from_str::<uint>("5");
@ftxqxd
Copy link
Contributor

ftxqxd commented Dec 27, 2014

from_str is deprecated and should not be used any more; parse replaces it. That line of code compiles for me, so are you sure that you’re on the latest nightly build of Rust?

@alexcrichton
Copy link
Member

Yes, from_str was deprecated recently and you may need to update your local installation.

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

4 participants