Skip to content

Clarify how normal modules are located inside a #[path] module. #573

Open
@ehuss

Description

@ehuss

The path attribute documentation explains how #[path] annotated modules are found. It does not explain how non-attributed modules are located once inside a #[path] module. For example:

// lib.rs
#[path = "foo.rs"]
mod x;
// foo.rs
mod y;   // y must be y.rs or y/mod.rs, relative to foo.rs.

In this case, once inside foo.rs, module locations will be relative to foo's location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions