-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Exponential (?) time complexity in evaluate_trait_predicate_recursively
in rustdoc when proving Send/Sync
#106930
Comments
From the thread on #106745:
|
|
Interestingly, |
Both of the PRs that are blocked by this issue are changes that change the ast. |
It seems it's not an infinite loop, but just bad (exponential?) time complexity somewhere. @oli-obk suggested trying out what happens when explicitly implementing Send and Sync for the new ast node, and that indeed 'fixes' the problem in #106745: #[cfg(parallel_compiler)]
unsafe impl Sync for FormatArgs {}
#[cfg(parallel_compiler)]
unsafe impl Send for FormatArgs {} So this issue has almost nothing to do with parallel compiler. It occurs in regular non-parallel rustdoc. It's just that with (Oli is investigating.) |
evaluate_trait_predicate_recursively
in rustdoc with parallel compilerevaluate_trait_predicate_recursively
in rustdoc when proving Send/Sync
Data point: Adding the following snippet to #[cfg(parallel_compiler)]
#[allow(rustc::usage_of_qualified_ty)]
pub fn check_for_send(tcx: ty::TyCtxt<'static>) -> impl Send {
tcx
} This makes me think the issue is very much rustdoc related, as it appears to get stuck on proving |
WG-prioritization assigning priority (Zulip discussion) (note: seems not a regression) @rustbot label -I-prioritize +P-high |
#[Edit] I'm trying to solve this problem and what I'm currently observing is that the I guess it may be that rustdoc does not calculate the trait implementation on some data structures (such as |
A revealing phenomenon:
But when the generics are instantiated, it will not cause blocking:
So I guess it is |
@SparrowLii does this happen even with Line 696 in 0f27161
Line 1148 in d60c64a
|
If so, this is probably related to rust/src/librustdoc/clean/auto_trait.rs Line 139 in 0f27161
|
I can't reproduce this issue now, including my local test Have there been any recent changes? |
get auto traits for parallel rustc test for #106930 #[Edit] Since this doesn't block try build now, we can close rust-lang/rust#106930 fixes #106930
There is a latent bug in
parallelrustdoc that hangs inx.py doc compiler/rustc_driver --stage=1
whenparallel_compiler
is enabled.This is currently blocking #104754 and #106745.The text was updated successfully, but these errors were encountered: