Skip to content

Somewhat unclear/wrong information about paths and modules #2997

@terjeros

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions