We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you do this in a lib.rs in crate a:
lib.rs
a
pub mod module;
and then you do this in a module.rs in the same crate:
module.rs
pub use module;
and then you use the crate a in a crate b then rustc will hang indefinitely during the compilation.
b
cargo new a cargo new --bin b echo 'pub mod module;' > a/src/lib.rs echo 'pub use module;' > a/src/module.rs echo '[dependencies.a]' >> b/Cargo.toml echo 'path = "../a"' >> b/Cargo.toml echo 'extern crate a;' >> b/src/main.rs echo 'struct Instance { x: a::A }' >> b/src/main.rs cd b cargo build
rustc 1.10.0-nightly (179539f 2016-05-20) host: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered:
cc me
Sorry, something went wrong.
Reproduced on i686-pc-windows-gnu, with rustc 1.11.0-nightly (ab0b874 2016-06-13).
It may be interesting to see the output of cargo rustc -- -Ztime-passes:
cargo rustc -- -Ztime-passes
time: 0.000; rss: 26MB parsing time: 0.000; rss: 26MB configuration 1 time: 0.000; rss: 26MB recursion limit time: 0.000; rss: 26MB crate injection time: 0.000; rss: 26MB plugin loading time: 0.000; rss: 26MB plugin registration time: 0.045; rss: 55MB expansion time: 0.000; rss: 55MB gated configuration checking time: 0.000; rss: 55MB maybe building test harness time: 0.000; rss: 55MB checking for inline asm in case the target doesn't support it time: 0.000; rss: 55MB complete gated feature checking time: 0.000; rss: 55MB assigning node ids time: 0.000; rss: 55MB collecting defs time: 0.010; rss: 55MB external crate/lib resolution time: 0.000; rss: 55MB early lint checks time: 0.000; rss: 55MB AST validation ^C
It seems that it goes wrong in name resolution, which is the step after AST validation.
I fixed this in #34542.
Rollup merge of rust-lang#34542 - jseyfried:fix_recursive_modules, r=nrc
8e2598c
Fix non-termination on recursive module re-exports in extern crates Fixes rust-lang#33776. r? @nrc
No branches or pull requests
If you do this in a
lib.rs
in cratea
:and then you do this in a
module.rs
in the same crate:and then you use the crate
a
in a crateb
then rustc will hang indefinitely during the compilation.Steps to reproduce
Meta
rustc 1.10.0-nightly (179539f 2016-05-20)
host: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: