Skip to content

A mistake in the document guide.md #20255

Closed

Description

@soulmachine

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");

Activity

  1. ftxqxd commented on Dec 27, 2014

    @ftxqxd
    Contributor

    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?

  2. alexcrichton commented on Dec 28, 2014

    @alexcrichton
    Member

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

  3. added a commit that references this issue on Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions