You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rustdoc ICEs when a dependency has duplicate generic bounds to functions returning tuples #57180
Minimized from a failing rustc PR updating polonius, itself coming with a newer revision of datafrog.
There's a minimized reproduction here.
If you add this crate as a git dependency, and use it, like so:
use docfail::Leaper;fnmain(){}
Rustdoc will crash while trying to build the doc for this dependent crate (note that it does not fail building docs in the docfail repo itself)
Crash details:
Documenting repro v0.1.0 (/Users/rrakic/Documents/rust/docfail)
thread '<unnamed>' panicked at 'assertion failed: output.is_none()', src/librustdoc/clean/simplify.rs:108:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.32.0-nightly (14997d56a 2018-12-05) running on x86_64-apple-darwin
error: Could not document `repro`.
The essence of the problem is the duplicate bounds on an impl inside the dependency:
Removing either of the duplicate Fn(...) bound will work around the crash. The bound requires that the closure return a tuple, and the rustdoc trace seems to be code related to parentheses.
I can reproduce the crash on stable 1.31.0 (abe02cefd 2018-12-04), 1.31.1 (b6c32da9b 2018-12-18), an older nightly from the beginning of December (14997d56a 2018-12-05), but haven't bisected older releases.
I couldn't find other issues mentioning this, and the error only appeared in the aforementioned rust PR.
Thanks to @Mark-Simulacrum for the help in locating this quite uncommon issue.
After some more analysis today, I realize the above comment is not the cause of the issue. I was using cargo rustdoc in my bisect script. The above commit is what causes cargo rustdoc to start failing, but cargo doc was failing before this. I'll do some more bisect analysis to see if I can figure out when this really started.
I reran cargo-bisect-rustc with cargo doc and got the same result. Not sure why cargo doc was giving a different result from cargo rustdoc earlier.
Activity
Remove duplicate bounds on generics
Nashenas88 commentedon Aug 26, 2019
I'll try to take this on later tonight.
Fix ICE in rustdoc when merging generic and where bounds in the case …
Nashenas88 commentedon Aug 30, 2019
I tracked this bug down to this commit: 6aa7493 It's not clear to me exactly why this commit would cause that issue. Any idea @QuietMisdreavus ?
Nashenas88 commentedon Aug 30, 2019
Stems from this PR #53162
Nashenas88 commentedon Sep 10, 2019
After some more analysis today, I realize the above comment is not the cause of the issue. I was usingcargo rustdocin my bisect script. The above commit is what causescargo rustdocto start failing, butcargo docwas failing before this. I'll do some more bisect analysis to see if I can figure out when this really started.I reran cargo-bisect-rustc with
cargo docand got the same result. Not sure whycargo docwas giving a different result fromcargo rustdocearlier.Rollup merge of rust-lang#63937 - Nashenas88:rustdoc_57180, r=Guillau…
Auto merge of #63937 - Nashenas88:rustdoc_57180, r=GuillaumeGomez