Skip to content

Missing information about source file name - Getting Started  #34523

Closed
@hhnr

Description

@hhnr

In the rust book Getting Started section, it is mentioned that we can have source file name as "hello_world.rs", however in the cargo introduction section if we move the file inside src directory and run cargo build, it fails. Having the file renamed as main.rs makes cargo build success. This is not mentioned in the getting started document.

I think the Getting Started section should either say that the file name should be main.rs or if the file name is other than main.rs, it should mention on how to make cargo build succeed by telling the cargo to look for hello_world.rs in the src directory.

https://doc.rust-lang.org/book/getting-started.html

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