Skip to content
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

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

Closed
dpc opened this issue Jun 23, 2016 · 4 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@dpc
Copy link
Contributor

dpc commented Jun 23, 2016

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

@dpc dpc changed the title nightly doc panic panicked at 'called Option::unwrap() on a None value', ../src/libcore/option.rs:325 nightly regression: cargo doc panics with panicked at 'called Option::unwrap() on a None value', ../src/libcore/option.rs:325 Jun 23, 2016
@SimonSapin
Copy link
Contributor

I saw this in https://github.com/servo/tendril too.

@alexcrichton
Copy link
Member

Is there perhaps a minimization of the panic as well?

cc @ollie27, sound familiar?

@alexcrichton alexcrichton added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jun 23, 2016
@ollie27
Copy link
Member

ollie27 commented Jun 23, 2016

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() {}
}

@ollie27
Copy link
Member

ollie27 commented Jun 23, 2016

#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.

bors added a commit that referenced this issue Jun 24, 2016
rustdoc: Fix panic caused by doc(hidden) trait methods

Fixes: #34423

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

4 participants