Skip to content

regression: crate compilation regression on reporting errors with Rust 1.68-nightly (62bf38fa6 2025-01-10) #136516

Open
@erickt

Description

@erickt

Hello folks,

On Fuchsia we've noticed a pretty significant complication time regression in Fuchsia when reporting an error in code when we accidentally out an associated type from an impl. This is very analogous to an issue we had in 2023 with #116996 where the compiler appeared to get stuck in a livelock or some exponential-time worst case scenario if we forgot to use a type that was referenced in the code. As far as we can tell that was fixed #132625.

We ran into this in two different places. First was with a missing associated type in a trait impl in http://fxrev.dev/1180033/10..11 in the testutil.rs, where the bug occurred in "Patchset 10" and fixed in "Patchset 11".

The second case was in http://fxrev.dev/1179835 (our internal bug is https://fxbug.dev/385922001 for any Googlers), where we forgot to import frunner into the namespace. This would fix it:

use {
     fidl_fuchsia_io as fio, fidl_fuchsia_memory_attribution as fattribution,
-    fuchsia_async as fasync,
+    fuchsia_async as fasync, fidl_fuchsia_component_runner as frunner
 }; 

If it helps, here's the old thread we had on zulip t-types https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/Fuchsia.20Build.20Time.20Regression/near/495568058

Please let me know here or on zulip if there's anything you'd like us to test out, since it's a bit complicated to reproduce issues since it can take a long time to compile Fuchsia.

Meta

rustc --version --verbose:

Rust 1.68-nightly (62bf38fa6 2025-01-10)
Backtrace

The engineer who encountered this let rust run overnight, and after about 10 hours Rust finally erred out with this large backtrace: https://gist.github.com/erickt/76bd9586079552915f623fa7a378fc7d.

cc @lqd

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-compiletimeIssue: Problems and improvements with respect to compile times.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions