Closed
Description
Beginning with rustc 1.24.0-nightly (250b49205 2017-12-21)
, rustc
fails to find the appropriate file for a module when the module root is not mod_name/mod.rs
or mod_name.rs
(i.e, when using #[path]
). This has broken ring
, which has the following mod
declarations:
In lib.rs
:
#[path = "arithmetic/arithmetic.rs"]
mod arithmetic;
In arithmetic/arithmetic.rs
:
pub mod montgomery;
And arithmetic/montgomery.rs
contains the montgomery
module code. This results in the following error:
error[E0583]: file not found for module `montgomery`
--> $home/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.12.1/src/arithmetic/arithmetic.rs:15:9
|
15 | pub mod montgomery;
| ^^^^^^^^^^
|
= help: name the file either arithmetic/montgomery.rs or arithmetic/montgomery/mod.rs inside the directory "$home/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.12.1/src/arithmetic"
Related issues: briansmith/ring#598, #46531