Skip to content

Somewhat unclear/wrong information about paths and modules #2997

Description

@terjeros

In chapter Modules / Filesystem Hierarchy there is:

mod garden;

This tells Rust that the garden module content is found at src/garden.rs. Similarly, a garden::vegetables module
can be found at src/garden/vegetables.rs.

Which might imply that

mod garden::vegetables;

can be used, which is not true, to use such layout:

src/garden/vegetables.rs

a more complex setup is required.

Activity

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