-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Infinite recursion in rustdoc #16274
Comments
Steps to reproduce:
I don’t have a smaller test case yet, sorry. |
This part is very suspicious: // servo / src / components / style / properties / common_types.rs
pub mod computed {
//...
use super::*;
//...
} |
I even have this: pub mod longhands {
pub use super::*;
pub mod ${property.ident} {
use super::*;
// ... (… which rustc is perfectly happy with, for what it’s worth.) |
This circular reexport is worse: #![feature(globs)]
pub mod longhands {
pub use super::*;
pub use to_computed_value = super::common_types::computed::compute_CSSColor;
pub fn computed_as_specified() {}
}
pub mod common_types {
pub mod computed {
pub use compute_CSSColor = super::super::longhands::computed_as_specified;
}
} My rustdoc is not happy: edit: one more reexport |
I've encountered the not-infinite-recursion form mentioned above; here's a simple case to repro: #![crate_type = "lib"]
#![feature(globs)]
pub use a::Foo;
mod a {
pub struct Foo;
}
mod b {
pub use super::*;
} rustdoc prints out:
If you replace the super glob with |
A smaller test case to reproduce the infinite recursion is: #![crate_type = "lib"]
#![feature(globs)]
mod m {
pub use self::a::Foo;
mod a {
pub struct Foo;
}
mod b {
pub use super::*;
}
} rustdoc prints out:
Interestingly, if you make |
Fixes other test cases found in rust-lang#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
We’re now at a Rust version that has a fix for rust-lang/rust#16274
Add notable_trait predicate to `CompletionRelevance` Given a score of 1 for now, will change as per reviews needed.
When running rustdoc on Servo’s style crate, it currently exists with
task '<unknown>' has overflowed its stack
. Running it in gdb, the stack trace repeats these four lines a large number of times:Running it with
RUST_LOG=rustdoc::visit_ast
after addingdebug!()
lines invisit_mod_contents()
andresolve_id()
, this is a repeating pattern in the output after piping it throughcut -d'"' -f 1-2
I don’t know how to go from here. I don’t really understand what’s going on in the above log.
CC: @eddyb
The text was updated successfully, but these errors were encountered: