Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ehuss opened this issue Apr 21, 2019 · 0 comments
Open

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

ehuss opened this issue Apr 21, 2019 · 0 comments
Labels
A-attributes Area: Attributes

Comments

@ehuss
Copy link
Contributor

ehuss commented Apr 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes
Projects
None yet
Development

No branches or pull requests

1 participant