Skip to content

ICE for doc tests in beta and nightly #82257

Closed
@tspiteri

Description

@tspiteri

I can reproduce this on beta and nightly, but I cannot reproduce on stable 1.50.

For the fixed crate, if I run

RUST_BACKTRACE=full cargo +beta test --jobs 1 --doc FixedU8

I get

   Doc-tests fixed

running 183 tests
test src/lib.rs - FixedU8<Frac> (line 506) ... ok
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', library/test/src/lib.rs:356:75
stack backtrace:
   0:     0x7feb405dffa0 - std::backtrace_rs::backtrace::libunwind::trace::h7494b45d90ec45a4
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7feb405dffa0 - std::backtrace_rs::backtrace::trace_unsynchronized::h56cf2035161a18d9
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7feb405dffa0 - std::sys_common::backtrace::_print_fmt::hfd16b930749fd013
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7feb405dffa0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h50d455647eab6579
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7feb40650ebc - core::fmt::write::hfdcdeb08fb2b3afa
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/core/src/fmt/mod.rs:1096:17
   5:     0x7feb405d3072 - std::io::Write::write_fmt::hf1cdfbccd874d77e
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/io/mod.rs:1568:15
   6:     0x7feb405e3e85 - std::sys_common::backtrace::_print::h35bf1431e4a67498
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7feb405e3e85 - std::sys_common::backtrace::print::ha577b54ca4ed89f1
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7feb405e3e85 - std::panicking::default_hook::{{closure}}::h041688187fb081e5
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/panicking.rs:208:50
   9:     0x7feb405e39e3 - std::panicking::default_hook::h38b8114a34b4f6c0
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/panicking.rs:225:9
  10:     0x7feb40e46adb - rustc_driver::report_ice::h5e8e7d4241fe0df1
  11:     0x7feb405e4786 - std::panicking::rust_panic_with_hook::h58660c406232fbfc
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/panicking.rs:595:17
  12:     0x7feb405e4277 - std::panicking::begin_panic_handler::{{closure}}::hff097664637c7a44
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/panicking.rs:495:13
  13:     0x7feb405e043c - std::sys_common::backtrace::__rust_end_short_backtrace::h8a007fccc86c0e19
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7feb405e4209 - rust_begin_unwind
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/panicking.rs:493:5
  15:     0x7feb4064d4e1 - core::panicking::panic_fmt::hf6d8a92b065b8f97
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/core/src/panicking.rs:92:14
  16:     0x7feb4064d42d - core::panicking::panic::h95b17729da7179c5
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/core/src/panicking.rs:50:5
  17:     0x7feb4514f107 - core::option::Option<T>::unwrap::h47c74bd2fe23c025
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/core/src/option.rs:386:21
  18:     0x7feb4514f107 - test::run_tests::hfffb15b8c49404df
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/test/src/lib.rs:356:32
  19:     0x7feb4513b79a - test::console::run_tests_console::hc166bb595cd467dc
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/test/src/console.rs:289:5
  20:     0x7feb451493e7 - test::test_main::hcf4bc684f97be649
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/test/src/lib.rs:123:15
  21:     0x5637adbc6131 - rustdoc::doctest::run::h27902d5728266d39
  22:     0x5637adabfc8f - rustdoc::main_options::h153ac0ec6baf65a8
  23:     0x5637adc9dc1a - scoped_tls::ScopedKey<T>::set::hf320609f0ed606ba
  24:     0x5637adb53b94 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4860adcadd77f826
  25:     0x5637adc5397a - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4097d230531997bd
  26:     0x7feb405f4daa - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h00bf6061a1045615
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/alloc/src/boxed.rs:1521:9
  27:     0x7feb405f4daa - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h50aabcaa2bcf0917
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/alloc/src/boxed.rs:1521:9
  28:     0x7feb405f4daa - std::sys::unix::thread::Thread::new::thread_start::h9819b11007f318cc
                               at /rustc/a5a775e3f9e8043dad405e00aee0ae60882a7b71/library/std/src/sys/unix/thread.rs:71:17
  29:     0x7feb404d93f9 - start_thread
  30:     0x7feb402beb53 - __clone
  31:                0x0 - <unknown>

error: internal compiler error: unexpected panic

error: Unrecognized option: 'test-args'

error: test failed, to rerun pass '--doc'

Meta

rustc +stable --version --verbose:

rustc 1.50.0 (cb75ad5db 2021-02-10)
binary: rustc
commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
commit-date: 2021-02-10
host: x86_64-unknown-linux-gnu
release: 1.50.0

rustc +beta --version --verbose:

rustc 1.51.0-beta.1 (a5a775e3f 2021-02-11)
binary: rustc
commit-hash: a5a775e3f9e8043dad405e00aee0ae60882a7b71
commit-date: 2021-02-11
host: x86_64-unknown-linux-gnu
release: 1.51.0-beta.1
LLVM version: 11.0.1

rustc +stable --version --verbose:

rustc 1.52.0-nightly (e9920ef77 2021-02-11)
binary: rustc
commit-hash: e9920ef7749d11fc71cc32ca4ba055bcfeaab945
commit-date: 2021-02-11
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 11.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions