Open
Description
My crate has some test support data in tests/support/mod.rs
. When trying to load this module for unit tests like this:
mod tests {
#[path="../tests/support/mod.rs"]
mod support;
}
I get an error like this:
error: couldn't read "src/tests/../tests/support/mod.rs": No such file or directory (os error 2)
In fact, specifying pretty much any path is going to fail, because the src/tests/
directory does not exist, because I'm using a nested module and not a separate file. When using nested modules, I think the path at which relative path resolution should start should be the directory that the actual source file is in.
Metadata
Metadata
Assignees
Labels
Area: Attributes (`#[…]`, `#![…]`)Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.