rust-lang/rust

nightly regression: `cargo doc` panics with `panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:325`

Closed this issue · 4 comments

dpc commented
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:325
stack backtrace:
   1:     0x7f02970517df - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9
   2:     0x7f029705f78b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508
   3:     0x7f029705f3bf - std::panicking::default_hook::he0146e6a74621cb4
   4:     0x7f029702531e - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
   5:     0x7f029705f9d1 - std::panicking::begin_panic::he426e15a3766089a
   6:     0x7f029702737a - std::panicking::begin_panic_fmt::hdddb415186c241e7
   7:     0x7f029705f96e - rust_begin_unwind
   8:     0x7f02970a899f - core::panicking::panic_fmt::hf4e16cb7f0d41a25
   9:     0x7f02970a9498 - core::panicking::panic::h907815f47e914305
  10:     0x7f0297652f03 - rustdoc::html::render::render_impl::doctraititem::h32eec0f432e5269b
  11:     0x7f0297651996 - rustdoc::html::render::render_impl::h8405bc03794cc756
  12:     0x7f029764f384 - rustdoc::html::render::render_assoc_items::h4704ada9fa7cc3e3
  13:     0x7f0297647f6a - _<rustdoc..html..render..Item<'a> as core..fmt..Display>::fmt::h9c0a28f83547182c
  14:     0x7f02970d30ea - core::fmt::write::hdac96890aec66a9a
  15:     0x7f02975ff892 - std::io::Write::write_fmt::h8f7bba2797a77d53
  16:     0x7f02976408ff - rustdoc::html::render::Context::item::render::h4dbcafd1a53d9010
  17:     0x7f029756595e - rustdoc::html::render::run::h804448c4d17b6d11
  18:     0x7f0297546005 - rustdoc::main_args::h92ed2068a7dd9783
  19:     0x7f02975419ea - std::panicking::try::call::ha3f28c009d90b0a9
  20:     0x7f029706dc4b - __rust_try
  21:     0x7f029706dbee - __rust_maybe_catch_panic
  22:     0x7f0297541ea2 - _<F as alloc..boxed..FnBox<A>>::call_box::hb90cf37bd6edcde3
  23:     0x7f029705d8b4 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
  24:     0x7f028f284619 - start_thread
  25:     0x7f0296ca759c - clone
  26:                0x0 - <unknown>
error: Could not document `nix`.

https://travis-ci.org/dpc/mioco/jobs/139555546

Is there perhaps a minimization of the panic as well?

cc @ollie27, sound familiar?

Yeah this looks like #34292 caused it, sorry about that. I didn't anticipate traits having their methods stripped and then us trying to generate documentation for implementations of those methods (which I'm pretty sure we shouldn't be doing).

Here's a minimal example:

pub struct Foo;

pub trait Bar {
    #[doc(hidden)]
    fn bar() {}
}

impl Bar for Foo {
    fn bar() {}
}

#34439 should fix it but I'm very confused as to why assert_receiver_is_total_eq is showing up on http://doc.servo.org/tendril/enum.SubtendrilError.html which I think is what's causing this for that crate.