Open
Description
I tried this code:
trait Bar {
type Element: Bar;
}
struct Foo<T: Bar>(T, *const Foo<T::Element>);
This code compiles fine with cargo build
. However, running cargo doc
causes it to hang.
Likely related to rust-lang/rust-clippy#13544 and #133356
Discovered by super_surviveur on the rust official discord.
Meta
rustc --version --verbose
:
rustc 1.88.0-nightly (78f2104e3 2025-04-16)
binary: rustc
commit-hash: 78f2104e334068d5a892a170d50193c0025c690e
commit-date: 2025-04-16
host: aarch64-apple-darwin
release: 1.88.0-nightly
LLVM version: 20.1.2
@rustbot labels +T-rustdoc +I-hang
Metadata
Metadata
Assignees
Labels
Area: auto traits (e.g., `auto trait Send {}`)Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsArea: Trait systemCategory: This is a bug.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Relevant to the rustdoc team, which will review and decide on the PR/issue.Fixed by the next-generation trait solver, `-Znext-solver`.